📄 x_kbde.c
字号:
/* keyboard emulator project Copyright (C) 1998-2003 Reznic Valery <valery_reznic@users.sourceforge.net> This program is free software; you can redistribute it and/or modify it under the terms of the GNU Licence General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */#include <kbde.h>#include <string.h>#include "kbde_code.inc"#define ARRAYSIZE(x) (sizeof(x) / sizeof(x[0]))int kbde_key_press(int key_code, char *buffer){ if ( (key_code <= 0) && key_code >= ARRAYSIZE(MakeCodes) ) return -1; strcpy(buffer, MakeCodes[key_code]); return strlen(buffer); }int kbde_key_release(int key_code, char *buffer){ if ( (key_code <= 0) && key_code >= ARRAYSIZE(BreakCodes) ) return -1; strcpy(buffer, BreakCodes[key_code]); return strlen(buffer); }int kbde_key_press_release(int key_code, char *buffer){ if ( (key_code <= 0) && key_code >= ARRAYSIZE(BreakCodes) ) return -1; strcpy(buffer, MakeCodes [key_code]); strcat(buffer, BreakCodes[key_code]); return strlen(buffer);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -