0%

Client Constants constant light table

Constant table on api.Constants

Keyboard scan code

  • K_ENTER=40, – Enter
  • K_LCTRL=224, – left ctrl
  • K_LSHIFT=225, – left shift
  • K_LALT=226, – left 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, – points
  • K_NEQUAL=88, – small carriage return
  • K_NPLUS=87, – Add
  • K_NDECREASE=86, – subtract
  • K_NMULTIPLY=85, – multiply
  • K_NDIVIDE=84, – divide
  • K_TAB=43, – TAB
  • K_SPACE=44, – space
  • K_BACKSPACE=42, – backspace
  • 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, – minus sign
  • K_EQUAL=46, – equal to
  • K_PE=53, – backtick
  • K_FXG=49, – backslash
  • K_ZFK=47, – left square bracket
  • K_YFK=48, – right square bracket
  • K_FH=51, – semicolon
  • K_DYH=52, – single quote
  • K_DH=54, – comma
  • K_JH=55, – period
  • K_XG=56, – slash
  • 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 to stay on

  • TOUCH_CLICKED=1, – standalone
  • TOUCH_DOUBLECLICKED=2, – double click
  • TOUCH_LEFTSLID=3, – slide left
  • TOUCH_SLIDRIGHT=4, – slide right
  • TOUCH_SLIDUP=5, – slide up
  • TOUCH_SLIDDOWN=6, – slide
  • TOUCH_SCROLLLEFT=7, – push left
  • TOUCH_SCROLLRIGHT=8, – push right
  • TOUCH_SCROLLUP=9, – push up
  • TOUCH_SCROLLDOWN=10, – push down
  • TOUCH_SCROLLEND=11, – Stop pushing
  • TOUCH_LONGPRESSED=12, – long press
  • TOUCH_DOWN=13, – The finger touches the screen
  • TOUCH_MOVE=14, – Move your finger on the screen
  • TOUCH_UP=15, – Take your finger off the screen

Handle response code, msg.type

  • CONTROLLERAXISMOTION =0x650, – Controller axis changes, xbox controllers generally have 6 axes, the x and y movement axes of the left rocker of 0|1, the x|y direction axis of the right rocker of 2|3, and The two pressure rods 4|5 axes on the left and right sides of the front end
    CONTROLLERBUTTONDOWN=0x651, – The button on the controller is pressed, excluding the joystick movement, but including the two joystick buttons of the joystick being pressed. There is no repeated response after long pressing, and it will only be called once, which is different from the computer keyboard and Bluetooth keyboard.
    CONTROLLERBUTTONUP=0x652, – button lift message on the handle

Controller button code, different controllers have different numbers of buttons, msg.button

CB_INVALID=-1, – The system cannot recognize the hardware button
CB_A=0, – Controller A button
CB_B=1, – controller B button
CB_X=2, – Controller X key
CB_Y=3, – controller Y key
CB_BACK=4, – Controller return key
CB_GUIDE=5, – Controller guidance keys
CB_START=6, – Controller start button
CB_LEFTSTICK=7, – The left joystick of the controller is pressed
CB_RIGHTSTICK=8, – The right joystick of the controller is pressed
CB_LEFTSHOULDER=9, – the left button on the front of the controller
CB_RIGHTSHOULDER=10, – right button on the front of the handle
CB_DPAD_UP=11, – controller direction keyboard
CB_DPAD_DOWN=12, – controller direction keyboard down
CB_DPAD_LEFT=13, – controller direction keyboard left
CB_DPAD_RIGHT=14, – controller direction keyboard right
CB_MISC1=15, – controller miscellaneous keys
CB_PADDLE1=16,
CB_PADDLE2=17,
CB_PADDLE3=18,
CB_PADDLE4=19,
CB_TOUCHPAD=20, – The handle touchpad was touched, and the detailed touch function game controller interface is not yet available.
CB_MAX=21,

Mouse response code (type)

MOUSEMOTION=0x400, – mouse movement
MOUSEBUTTONDOWN=0x401,–Mouse case pressed
MOUSEBUTTONUP=0x402, – Mouse case raised
MOUSEWHEEL=0x403, – mouse wheel

Mouse case(button)

BUTTON_LEFT=1,
BUTTON_MIDDLE=2,
BUTTON_RIGHT=3,
BUTTON_X1=4,
BUTTON_X2=5,

Keyboard, mouse, handle case, etc. status (state)

RELEASED=0,
PRESSED=1,