在api.Constants上的常亮表
键盘扫描码
- K_ENTER=40, – 回车
- K_LCTRL=224, – 左ctrl
- K_LSHIFT=225, – 左shift
- K_LALT=226, – 左alt
- K_RCTRL=228,
- K_RSHIFT=229,
- K_RALT=230,
- K_APPS=101,
- K_F1=58,
- K_F2=59,
- K_F3=60,
- K_F4=61,
- K_F5=62,
- K_F6=63,
- K_F7=64,
- K_F8=65,
- K_F9=66,
- K_F10=67,
- K_F11=68,
- K_F12=69,
- K_UP=82,
- K_DOWN=81,
- K_LEFT=80,
- K_RIGHT=79,
- K_HOME=74,
- K_END=77,
- K_PAGEUP=75,
- K_PAGEDOWN=78,
- K_DEL=76,
- K_INSERT=73,
- K_NUMLOCK=83,
- K_N1=89,
- K_N2=90,
- K_N3=91,
- K_N4=92,
- K_N5=93,
- K_N6=94,
- K_N7=95,
- K_N8=96,
- K_N9=97,
- K_N0=98, – 1~0
- K_NPOINT=99, – 点
- K_NEQUAL=88, – 小回车
- K_NPLUS=87, – 加
- K_NDECREASE=86, – 减
- K_NMULTIPLY=85, – 乘
- K_NDIVIDE=84, – 除
- K_TAB=43, – TAB
- K_SPACE=44, – 空格
- K_BACKSPACE=42, – 退格
- K_ESC=41, – ESC
- K_1=30,
- K_2=31,
- K_3=32,
- K_4=33,
- K_5=34,
- K_6=35,
- K_7=36,
- K_8=37,
- K_9=38,
- K_0=39,
- K_DECREASE=45, – 减号
- K_EQUAL=46, – 等于
- K_PE=53, – 反撇号
- K_FXG=49, – 反斜杠
- K_ZFK=47, – 左方括号
- K_YFK=48, – 右方括号
- K_FH=51, – 分号
- K_DYH=52, – 单引号
- K_DH=54, – 逗号
- K_JH=55, – 句号
- K_XG=56, – 斜杠
- K_A=4,
- K_B=5,
- K_C=6,
- K_D=7,
- K_E=8,
- K_F=9,
- K_G=10,
- K_H=11,
- K_I=12,
- K_J=13,
- K_K=14,
- K_L=15,
- K_M=16,
- K_N=17,
- K_O=18,
- K_P=19,
- K_Q=20,
- K_R=21,
- K_S=22,
- K_T=23,
- K_U=24,
- K_V=25,
- K_W=26,
- K_X=27,
- K_Y=28,
- K_Z=29,
触摸常亮
- TOUCH_CLICKED=1, – 单机
- TOUCH_DOUBLECLICKED=2, – 双击
- TOUCH_LEFTSLID=3, – 左滑
- TOUCH_SLIDRIGHT=4, – 右滑
- TOUCH_SLIDUP=5, – 上滑
- TOUCH_SLIDDOWN=6, – 下滑
- TOUCH_SCROLLLEFT=7, – 左推
- TOUCH_SCROLLRIGHT=8, – 右推
- TOUCH_SCROLLUP=9, – 上推
- TOUCH_SCROLLDOWN=10, – 下推
- TOUCH_SCROLLEND=11, – 停止推
- TOUCH_LONGPRESSED=12, – 长按
- TOUCH_DOWN=13, – 手指触摸到屏幕
- TOUCH_MOVE=14, – 手指在屏幕上移动
- TOUCH_UP=15, – 手指离开屏幕
手柄响应码, msg.type
- CONTROLLERAXISMOTION =0x650, – 手柄轴变化,xbox手柄一般有6跟轴,0|1的左边的摇杆的x和y移动轴,2|3右边的摇杆的x|y方向轴,还有前端左右下面的两个压杆4|5轴
CONTROLLERBUTTONDOWN=0x651, – 手柄上的按钮被按下,不包括摇杆移动,但包括摇杆被按下的两个摇杆按钮。长按无repeated响应,只会被调用一次,和电脑键盘蓝牙键盘有区别。
CONTROLLERBUTTONUP=0x652, – 手柄上按钮抬起消息
手柄按键码,不同的手柄按键数量不同, msg.button
CB_INVALID=-1, – 系统无法识别硬件的按钮
CB_A=0, – 手柄A键
CB_B=1, – 手柄B键
CB_X=2, – 手柄X键
CB_Y=3, – 手柄Y键
CB_BACK=4, – 手柄返回键
CB_GUIDE=5, – 手柄指导键
CB_START=6, – 手柄开始键
CB_LEFTSTICK=7, – 手柄左边摇杆被按下
CB_RIGHTSTICK=8, – 手柄右边摇杆被按下
CB_LEFTSHOULDER=9, – 手柄前端左边键
CB_RIGHTSHOULDER=10, – 手柄前端右边键
CB_DPAD_UP=11, – 手柄方向键盘上
CB_DPAD_DOWN=12, – 手柄方向键盘下
CB_DPAD_LEFT=13, – 手柄方向键盘左
CB_DPAD_RIGHT=14, – 手柄方向键盘右
CB_MISC1=15, – 手柄杂项键
CB_PADDLE1=16,
CB_PADDLE2=17,
CB_PADDLE3=18,
CB_PADDLE4=19,
CB_TOUCHPAD=20, – 手柄触摸板被触摸,详细触摸功能游戏控制器接口暂未开放。
CB_MAX=21,
鼠标响应码(type)
MOUSEMOTION=0x400, – 鼠标移动
MOUSEBUTTONDOWN=0x401, – 鼠标案件按下
MOUSEBUTTONUP=0x402, – 鼠标案件抬起
MOUSEWHEEL=0x403, – 鼠标滚轮
鼠标案件(button)
BUTTON_LEFT=1,
BUTTON_MIDDLE=2,
BUTTON_RIGHT=3,
BUTTON_X1=4,
BUTTON_X2=5,
键盘,鼠标,手柄案件等状态(state)
RELEASED=0,
PRESSED=1,