kbmhit.c
来自「详细介绍了一篇关于pci开发的接口芯片」· C语言 代码 · 共 32 行
C
32 行
/* CXL - Copyright (c) 1987-1989 by Mike Smedley - All Rights Reserved */
/* KBMHIT.C - determines if a key or mouse button was pressed */
#include <conio.h>
#include <dos.h>
#include "cxldef.h"
#include "cxlkey.h"
#include "cxlmou.h"
#if defined(_M_IX86)
#define bioskey(a) _bios_keybrd(a)
#endif
int kbmhit(void)
{
int bstat,row,col; /* mouse variables */
/* process keyboard handler */
if(_kbinfo.kbloop!=NULL) (*_kbinfo.kbloop) ();
/* check for a keypress in CXL's and BIOS's keyboard buffers */
if( _kbinfo.kbuf!=NULL || kbhit() ) return(YES);
/* if mouse, get mouse status, if a button was pressed, return YES */
if(_mouse) {
msstatus(&bstat,&row,&col);
if(bstat) return(YES);
}
return(NO);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?