lua 里面的:
KEY_NONE = 0,
KEY_PAUSE = 0x0013,
KEY_SCROLL_LOCK = 0x1014,
KEY_PRINT = 0x1061,
KEY_SYSREQ = 0x106A,
KEY_BREAK = 0x106B,
KEY_ESCAPE = 0x001B,
KEY_BACKSPACE = 0x0008,
KEY_TAB = 0x0009,
KEY_BACK_TAB = 0x0089,
KEY_RETURN = 0x000D,
KEY_CAPS_LOCK = 0x00E5,
KEY_SHIFT = 0x00E1,
C++里面的宏:
enum class KeyCode
{
KEY_NONE ,
KEY_PAUSE,
KEY_SCROLL_LOCK,
KEY_PRINT,
KEY_SYSREQ,
KEY_BREAK,
KEY_ESCAPE,
KEY_BACKSPACE,
KEY_TAB,
KEY_BACK_TAB,
KEY_RETURN,
KEY_CAPS_LOCK,
KEY_SHIFT,
这也差太多了吧??
我想监听返回键 难道我要直接写 if keyCode == 6 then 吗