📄 key.c
字号:
/*
* key.c Ver 0.0
*
* (c) Copyright ChangHong NetWork Co. Ltd, MianYang PRC, 2004.8.19
*
* Source file name : key.c
* Author : Robert ChengZhiJun ( czj_robert@sohu.com )
*
* Original Work : none
*
* Introduction :
* This file is to encapsulate the KEY press function!
*
* =======================
* IMPROVEMENTS THOUGHT OF
* =======================
*
* =====================
* MODIFICATION HISTORY
* =====================
*
* Date Initials Modification
* ---- -------- ------------
*
*
*/
/*
* define the keys
*/
#define MUTE_KEY 0x18
#define I_FRAME_KEY 0x20
/*
* read char on the keyboard of the computer, return 16 bit scan code
*/
typedef enum
{
CURSOR_OFF,
CURSOR_ON
} cursor_state_t;
int ReadKey ( cursor_state_t cursorStatus, clock_t tclkWaitTime )
{
union REGS rg;
cursorStatus = CURSOR_OFF; /*no use for Turbo C, adding this for no warning when compiling this program*/
tclkWaitTime = 0; /*no use for Turbo C, adding this for no warning when compiling this program*/
rg.h.ah = 0;
int86 ( 0x16, &rg, &rg );
/*
* czj040823 for TURBO C
*/
#if 1
#if 0
printf ( " rg.h.ah1 = %d \n", rg.h.ah );
#endif
switch ( rg.h.ah )
{
/*czj040823 just for MUTE_KEY :: 'U' or 'u'*/
case 22:
rg.h.ah = MUTE_KEY;
break;
/*czj040823 just for I_FRAME_KEY :: 'F' or 'f'*/
case 33:
rg.h.ah = I_FRAME_KEY;
break;
default:
break;
}
#endif
return rg.h.ah;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -