1 KeyASCII ASCII Common Name 2 K_BACKSPACE backspace 3 K_TAB tab 4 K_CLEAR clear 5 K_RETURN return 6 K_PAUSE pause 7 K_ESCAPE ^[ escape 8 K_SPACE space 9 K_EXCLAIM ! exclaim 10 K_QUOTEDBL " quotedbl 11 K_HASH # hash 12 K_DOLLAR $ dollar 13 K_AMPERSAND & ampersand 14 K_QUOTE quote 15 K_LEFTPAREN ( left parenthesis 16 K_RIGHTPAREN ) right parenthesis 17 K_ASTERISK * asterisk 18 K_PLUS + plus sign 19 K_COMMA , comma 20 K_MINUS - minus sign 21 K_PERIOD . period 22 K_SLASH / forward slash 23 K_0 0 0 24 K_1 1 1 25 K_2 2 2 26 K_3 3 3 27 K_4 4 4 28 K_5 5 5 29 K_6 6 6 30 K_7 7 7 31 K_8 8 8 32 K_9 9 9 33 K_COLON : colon 34 K_SEMICOLON ; semicolon 35 K_LESS < less-than sign 36 K_EQUALS = equals sign 37 K_GREATER > greater-than sign 38 K_QUESTION ? question mark 39 K_AT @ at 40 K_LEFTBRACKET [ left bracket 41 K_BACKSLASH backslash 42 K_RIGHTBRACKET ] right bracket 43 K_CARET ^ caret 44 K_UNDERSCORE _ underscore 45 K_BACKQUOTE ` grave 46 K_a a a 47 K_b b b 48 K_c c c 49 K_d d d 50 K_e e e 51 K_f f f 52 K_g g g 53 K_h h h 54 K_i i i 55 K_j j j 56 K_k k k 57 K_l l l 58 K_m m m 59 K_n n n 60 K_o o o 61 K_p p p 62 K_q q q 63 K_r r r 64 K_s s s 65 K_t t t 66 K_u u u 67 K_v v v 68 K_w w w 69 K_x x x 70 K_y y y 71 K_z z z 72 K_DELETE delete 73 K_KP0 keypad 0 74 K_KP1 keypad 1 75 K_KP2 keypad 2 76 K_KP3 keypad 3 77 K_KP4 keypad 4 78 K_KP5 keypad 5 79 K_KP6 keypad 6 80 K_KP7 keypad 7 81 K_KP8 keypad 8 82 K_KP9 keypad 9 83 K_KP_PERIOD . keypad period 84 K_KP_DIVIDE / keypad divide 85 K_KP_MULTIPLY * keypad multiply 86 K_KP_MINUS - keypad minus 87 K_KP_PLUS + keypad plus 88 K_KP_ENTER keypad enter 89 K_KP_EQUALS = keypad equals 90 K_UP up arrow 91 K_DOWN down arrow 92 K_RIGHT right arrow 93 K_LEFT left arrow 94 K_INSERT insert 95 K_HOME home 96 K_END end 97 K_PAGEUP page up 98 K_PAGEDOWN page down 99 K_F1 F1 100 K_F2 F2 101 K_F3 F3 102 K_F4 F4 103 K_F5 F5 104 K_F6 F6 105 K_F7 F7 106 K_F8 F8 107 K_F9 F9 108 K_F10 F10 109 K_F11 F11 110 K_F12 F12 111 K_F13 F13 112 K_F14 F14 113 K_F15 F15 114 K_NUMLOCK numlock 115 K_CAPSLOCK capslock 116 K_SCROLLOCK scrollock 117 K_RSHIFT right shift 118 K_LSHIFT left shift 119 K_RCTRL right control 120 K_LCTRL left control 121 K_RALT right alt 122 K_LALT left alt 123 K_RMETA right meta 124 K_LMETA left meta 125 K_LSUPER left Windows key 126 K_RSUPER right Windows key 127 K_MODE mode shift 128 K_HELP help 129 K_PRINT print screen 130 K_SYSREQ sysrq 131 K_BREAK break 132 K_MENU menu 133 K_POWER power 134 K_EURO Euro 135 136 137 event.x 鼠标横轴 138 event.y 鼠标纵轴 139 event.keycode 键盘值 140 events.button==0 默认。没有按任何按钮。 141 events.button==1 鼠标左键 142 events.button==2 鼠标右键 143 events.button==3 鼠标左右键同时按下 144 events.button==4 鼠标中键 145 events.button==5 鼠标左键和中键同时按下 146 events.button==6 鼠标右键和中键同时按下 147 events.button==7 所有三个键都按下