?? keystate.c
字號(hào):
#include <stdio.h>
#include <bios.h>
void main(void)
{
unsigned int state, old_state = 0;
do {
state = _bios_keybrd(_KEYBRD_SHIFTSTATUS);
if (state != old_state)
{
old_state = state;
if (state & 0x80)
printf("Ins On ");
if (state & 0x40)
printf("Caps On ");
if (state & 0x20)
printf("Num Lock On ");
if (state & 0x10)
printf("Scroll Lock On ");
if (state & 0x08)
printf("Alt pressed ");
if (state & 0x04)
printf("Ctrl pressed ");
if (state & 0x02)
printf("Left shift pressed ");
if (state & 0x01)
printf("Right shift pressed ");
printf("\n");
}
} while (! _bios_keybrd(_KEYBRD_READY));
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -