Skip to content

页面按键简介

KeyEvent对象

属性类型说明
keyCodeNumber按键值
actionNumber按键动作
keyRepeatNumber按键重复次数

ESKeyAction

按键动作

点击查看源码
js
export const ES_KEY_ACTION_DOWN = 0;
export const ES_KEY_ACTION_UP = 1;

ESKeyCode

常用按键值

点击查看源码
js
export const ES_KEYCODE_ENTER = 66;
export const ES_KEYCODE_DPAD_CENTER = 23;
export const ES_KEYCODE_DPAD_UP = 19;
export const ES_KEYCODE_DPAD_DOWN = 20;
export const ES_KEYCODE_DPAD_LEFT = 21;
export const ES_KEYCODE_DPAD_RIGHT = 22;
export const ES_KEYCODE_BACK = 4;
export const ES_KEYCODE_ESCAPE = 111;
export const ES_KEYCODE_MENU = 82;
export const ES_KEYCODE_SEARCH = 84;
export const ES_KEYCODE_F12 = 142;
export const ES_KEYCODE_BACKSLASH = 73;