EventListener

事件监听器

Functions

Link copied to clipboard

获取鼠标下标

Link copied to clipboard

判断指定按键是否被按下

Link copied to clipboard

更新键盘和鼠标的按键输入并触发事件

Link copied to clipboard

更新鼠标坐标并发布事件

Link copied to clipboard

注册一个键盘事件

Link copied to clipboard

注册一个鼠标事件

Link copied to clipboard

注册一个鼠标坐标事件

Link copied to clipboard

删除一个键盘事件

Link copied to clipboard

删除一个鼠标事件

Link copied to clipboard

删除一个鼠标坐标事件

Properties

Link copied to clipboard
const val KEY_A: Int = 65
Link copied to clipboard
const val KEY_ALT: Int = 18
Link copied to clipboard
const val KEY_B: Int = 66
Link copied to clipboard
const val KEY_BACK_QUOTE: Int = 192

反引号、波浪线

Link copied to clipboard
const val KEY_BACKSLASH: Int = 220

反斜杠、竖线

Link copied to clipboard
const val KEY_BACKSPACE: Int = 8
Link copied to clipboard
const val KEY_BRACKET_SQUARE_LEFT: Int = 219

左方括号、左大括号

Link copied to clipboard
const val KEY_BRACKET_SQUARE_RIGHT: Int = 221

右方括号、右大括号

Link copied to clipboard
const val KEY_BREAK: Int = 19
Link copied to clipboard
const val KEY_C: Int = 67
Link copied to clipboard
const val KEY_CAPS_LOCK: Int = 20
Link copied to clipboard
const val KEY_COMMA: Int = 188

逗号、左尖括号

Link copied to clipboard
const val KEY_CTRL: Int = 17
Link copied to clipboard
const val KEY_CTRL_LEFT: Int = 162
Link copied to clipboard
const val KEY_CTRL_RIGHT: Int = 163
Link copied to clipboard
const val KEY_D: Int = 68
Link copied to clipboard
const val KEY_DELETE: Int = 46
Link copied to clipboard
const val KEY_DOWN: Int = 40
Link copied to clipboard
const val KEY_E: Int = 69
Link copied to clipboard
const val KEY_END: Int = 35
Link copied to clipboard
const val KEY_ENTER: Int = 13
Link copied to clipboard
const val KEY_EQUAL: Int = 187

等于号、加号

Link copied to clipboard
const val KEY_ESC: Int = 27
Link copied to clipboard
const val KEY_F: Int = 70
Link copied to clipboard
const val KEY_F1: Int = 112
Link copied to clipboard
const val KEY_F10: Int = 121
Link copied to clipboard
const val KEY_F11: Int = 122
Link copied to clipboard
const val KEY_F12: Int = 123
Link copied to clipboard
const val KEY_F13: Int = 124
Link copied to clipboard
const val KEY_F14: Int = 125
Link copied to clipboard
const val KEY_F15: Int = 126
Link copied to clipboard
const val KEY_F16: Int = 127
Link copied to clipboard
const val KEY_F17: Int = 128
Link copied to clipboard
const val KEY_F18: Int = 129
Link copied to clipboard
const val KEY_F19: Int = 130
Link copied to clipboard
const val KEY_F2: Int = 113
Link copied to clipboard
const val KEY_F20: Int = 131
Link copied to clipboard
const val KEY_F21: Int = 132
Link copied to clipboard
const val KEY_F22: Int = 133
Link copied to clipboard
const val KEY_F23: Int = 134
Link copied to clipboard
const val KEY_F24: Int = 135
Link copied to clipboard
const val KEY_F3: Int = 114
Link copied to clipboard
const val KEY_F4: Int = 115
Link copied to clipboard
const val KEY_F5: Int = 116
Link copied to clipboard
const val KEY_F6: Int = 117
Link copied to clipboard
const val KEY_F7: Int = 118
Link copied to clipboard
const val KEY_F8: Int = 119
Link copied to clipboard
const val KEY_F9: Int = 120
Link copied to clipboard
const val KEY_G: Int = 71
Link copied to clipboard
const val KEY_H: Int = 72
Link copied to clipboard
const val KEY_HOME: Int = 36
Link copied to clipboard
const val KEY_I: Int = 73
Link copied to clipboard
const val KEY_INSERT: Int = 45
Link copied to clipboard
const val KEY_J: Int = 74
Link copied to clipboard
const val KEY_K: Int = 75
Link copied to clipboard
const val KEY_L: Int = 76
Link copied to clipboard
const val KEY_LEFT: Int = 37
Link copied to clipboard
const val KEY_M: Int = 77
Link copied to clipboard
const val KEY_MAIN0: Int = 48
Link copied to clipboard
const val KEY_MAIN1: Int = 49
Link copied to clipboard
const val KEY_MAIN2: Int = 50
Link copied to clipboard
const val KEY_MAIN3: Int = 51
Link copied to clipboard
const val KEY_MAIN4: Int = 52
Link copied to clipboard
const val KEY_MAIN5: Int = 53
Link copied to clipboard
const val KEY_MAIN6: Int = 54
Link copied to clipboard
const val KEY_MAIN7: Int = 55
Link copied to clipboard
const val KEY_MAIN8: Int = 56
Link copied to clipboard
const val KEY_MAIN9: Int = 57
Link copied to clipboard
const val KEY_MAIN_MINUS: Int = 189

减号、下划线

Link copied to clipboard
const val KEY_MAIN_POINT: Int = 190

句号、右尖括号

Link copied to clipboard
const val KEY_MAIN_SLASH: Int = 191

斜杠、问号

Link copied to clipboard
const val KEY_MENU: Int = 93
Link copied to clipboard
const val KEY_MENU_LEFT: Int = 164
Link copied to clipboard
const val KEY_MENU_RIGHT: Int = 165
Link copied to clipboard
const val KEY_N: Int = 78
Link copied to clipboard
const val KEY_NUM0: Int = 96
Link copied to clipboard
const val KEY_NUM1: Int = 97
Link copied to clipboard
const val KEY_NUM2: Int = 98
Link copied to clipboard
const val KEY_NUM3: Int = 99
Link copied to clipboard
const val KEY_NUM4: Int = 100
Link copied to clipboard
const val KEY_NUM5: Int = 101
Link copied to clipboard
const val KEY_NUM6: Int = 102
Link copied to clipboard
const val KEY_NUM7: Int = 103
Link copied to clipboard
const val KEY_NUM8: Int = 104
Link copied to clipboard
const val KEY_NUM9: Int = 105
Link copied to clipboard
const val KEY_NUM_LOCK: Int = 144
Link copied to clipboard
const val KEY_NUM_MINUS: Int = 108

减号

Link copied to clipboard
const val KEY_NUM_MULTIPLICATION: Int = 106

乘号

Link copied to clipboard
const val KEY_NUM_PLUS: Int = 107

加号

Link copied to clipboard
const val KEY_NUM_POINT: Int = 110

小数点

Link copied to clipboard
const val KEY_NUM_SLASH: Int = 111

除号

Link copied to clipboard
const val KEY_O: Int = 79
Link copied to clipboard
const val KEY_P: Int = 80
Link copied to clipboard
const val KEY_PAGE_DOWN: Int = 34
Link copied to clipboard
const val KEY_PAGE_UP: Int = 33
Link copied to clipboard
const val KEY_PAUSE: Int
Link copied to clipboard
Link copied to clipboard
const val KEY_Q: Int = 81
Link copied to clipboard
const val KEY_QUOTE: Int = 222

单引号、双引号

Link copied to clipboard
const val KEY_R: Int = 82
Link copied to clipboard
const val KEY_RIGHT: Int = 39
Link copied to clipboard
const val KEY_S: Int = 83
Link copied to clipboard
const val KEY_SCROLL_LOCK: Int = 145
Link copied to clipboard
const val KEY_SEMICOLON: Int = 186

分号、冒号

Link copied to clipboard
const val KEY_SHIFT: Int = 16
Link copied to clipboard
const val KEY_SHIFT_LEFT: Int = 160
Link copied to clipboard
const val KEY_SHIFT_RIGHT: Int = 161
Link copied to clipboard
const val KEY_SYS_RQ: Int = 44
Link copied to clipboard
const val KEY_T: Int = 84
Link copied to clipboard
const val KEY_TAB: Int = 9
Link copied to clipboard
const val KEY_U: Int = 85
Link copied to clipboard
const val KEY_UP: Int = 38
Link copied to clipboard
const val KEY_V: Int = 86
Link copied to clipboard
const val KEY_W: Int = 87
Link copied to clipboard
const val KEY_WIN_LEFT: Int = 91
Link copied to clipboard
const val KEY_WIN_RIGHT: Int = 92
Link copied to clipboard
const val KEY_X: Int = 88
Link copied to clipboard
const val KEY_Y: Int = 89
Link copied to clipboard
const val KEY_Z: Int = 90
Link copied to clipboard
const val MOUSE_CENTER: Int = 4
Link copied to clipboard
const val MOUSE_DOWN: Int = 5
Link copied to clipboard
const val MOUSE_LEFT: Int = 1
Link copied to clipboard
const val MOUSE_RIGHT: Int = 2
Link copied to clipboard
const val MOUSE_UP: Int = 6