The Keyboard class contains constants representing the most commonly used keys for controlling a game.

Keyboard 类的属性是一些常数,这些常数表示控制游戏时最常用的键。

构造函数

属性

A: number = 65

The constant associated with the key code value (65) for the A key.

与 A 键的键控代码值 (65) 关联的常数。

ALTERNATE: number = 18

The constant associated with the key code value (18) for the Alternate (Option) key.

与 Alternate (Option) 键的键控代码值 (18) 关联的常数。

B: number = 66

The constant associated with the key code value (66) for the B key.

与 B 键的键控代码值 (66) 关联的常数。

BACKQUOTE: number = 192

The constant associated with the key code value (192) for the backquote () key. @zh 与 键的键控代码值 (192) 关联的常数。

BACKSLASH: number = 220

The constant associated with the key code value (220) for the backslash () key.

与 \ 键的键控代码值 (220) 关联的常数。

BACKSPACE: number = 8

The constant associated with the key code value (8) for the Backspace key.

与 Backspace 的键控代码值 (8) 关联的常数。

C: number = 67

The constant associated with the key code value (67) for the C key.

与 C 键的键控代码值 (67) 关联的常数。

CAPS_LOCK: number = 20

The constant associated with the key code value (20) for the Caps Lock key.

与 Caps Lock 的键控代码值 (20) 关联的常数。

COMMA: number = 188

The constant associated with the key code value (188) for the comma (,) key.

与 F15 的键控代码值 (188) 关联的常数。

COMMAND: number = 15

The constant associated with the key code value (15) for the Mac Command key.

与 Mac 命令键 (15) 关联的常数。

CONTROL: number = 17

The constant associated with the key code value (17) for the Ctrl key.

与 Ctrl 的键控代码值 (17) 关联的常数。

D: number = 68

The constant associated with the key code value (68) for the D key.

与 D 键的键控代码值 (68) 关联的常数。

DELETE: number = 46

The constant associated with the key code value (46) for the Delete key.

与 Delete 的键控代码值 (46) 关联的常数。

DOWN: number = 40

The constant associated with the key code value (40) for the Down Arrow key.

与向下箭头键的键控代码值 (40) 关联的常数。

E: number = 69

The constant associated with the key code value (69) for the E key.

与 E 键的键控代码值 (69) 关联的常数。

END: number = 35

The constant associated with the key code value (35) for the End key.

与 End 的键控代码值 (35) 关联的常数。

ENTER: number = 13

The constant associated with the key code value (13) for the Enter key.

与 Enter 的键控代码值 (13) 关联的常数。

EQUAL: number = 187

The constant associated with the key code value (187) for the equal sign (=) key.

与 = 键的键控代码值 (187) 关联的常数。

ESCAPE: number = 27

The constant associated with the key code value (27) for the Esc key.

与 Esc 的键控代码值 (27) 关联的常数。

F: number = 70

The constant associated with the key code value (70) for the F key.

与 F 键的键控代码值 (70) 关联的常数。

F1: number = 112

The constant associated with the key code value (112) for the F1 key.

与 F1 的键控代码值 (112) 关联的常数。

F10: number = 121

The constant associated with the key code value (121) for the F10 key.

与 F10 的键控代码值 (121) 关联的常数。

F11: number = 122

The constant associated with the key code value (122) for the F11 key.

与 F11 的键控代码值 (122) 关联的常数。

F12: number = 123

The constant associated with the key code value (123) for the F12 key.

与 F12 的键控代码值 (123) 关联的常数。

F13: number = 124

The constant associated with the key code value (124) for the F13 key.

与 F13 的键控代码值 (124) 关联的常数。

F14: number = 125

The constant associated with the key code value (125) for the F14 key.

与 F14 的键控代码值 (125) 关联的常数。

F15: number = 126

The constant associated with the key code value (126) for the F15 key.

与 F15 的键控代码值 (126) 关联的常数。

F2: number = 113

The constant associated with the key code value (113) for the F2 key.

与 F2 的键控代码值 (113) 关联的常数。

F3: number = 114

The constant associated with the key code value (114) for the F3 key.

与 F3 的键控代码值 (114) 关联的常数。

F4: number = 115

The constant associated with the key code value (115) for the F4 key.

与 F4 的键控代码值 (115) 关联的常数。

F5: number = 116

The constant associated with the key code value (116) for the F5 key.

与 F5 的键控代码值 (116) 关联的常数。

F6: number = 117

The constant associated with the key code value (117) for the F6 key.

与 F6 的键控代码值 (117) 关联的常数。

F7: number = 118

The constant associated with the key code value (118) for the F7 key.

与 F7 的键控代码值 (118) 关联的常数。

F8: number = 119

The constant associated with the key code value (119) for the F8 key.

与 F8 的键控代码值 (119) 关联的常数。

F9: number = 120

The constant associated with the key code value (120) for the F9 key.

与 F9 的键控代码值 (120) 关联的常数。

G: number = 71

The constant associated with the key code value (71) for the G key.

与 G 键的键控代码值 (71) 关联的常数。

H: number = 72

The constant associated with the key code value (72) for the H key.

与 H 键的键控代码值 (72) 关联的常数。

HOME: number = 36

The constant associated with the key code value (36) for the Home key.

与 Home 的键控代码值 (36) 关联的常数。

I: number = 73

The constant associated with the key code value (73) for the I key.

与 I 键的键控代码值 (73) 关联的常数。

INSERT: number = 45

The constant associated with the key code value (45) for the Insert key.

与 Insert 的键控代码值 (45) 关联的常数。

J: number = 74

The constant associated with the key code value (74) for the J key.

与 J 键的键控代码值 (74) 关联的常数。

K: number = 75

The constant associated with the key code value (75) for the K key.

与 K 键的键控代码值 (75) 关联的常数。

L: number = 76

The constant associated with the key code value (76) for the L key.

与 L 键的键控代码值 (76) 关联的常数。

LEFT: number = 37

The constant associated with the key code value (37) for the Left Arrow key.

与向左箭头键的键控代码值 (37) 关联的常数。

LEFTBRACKET: number = 219

The constant associated with the key code value (219) for the left bracket ([) key.

与 [ 键的键控代码值 (219) 关联的常数。

M: number = 77

The constant associated with the key code value (77) for the M key.

与 M 键的键控代码值 (77) 关联的常数。

MINUS: number = 189

The constant associated with the key code value (189) for the minus (-) key.

与 - 键的键控代码值 (189) 关联的常数。

N: number = 78

The constant associated with the key code value (78) for the N key.

与 N 键的键控代码值 (78) 关联的常数。

NUMBER_0: number = 48

The constant associated with the key code value (48) for the 0 key.

与 0 的键控代码值(48) 关联的常数。

NUMBER_1: number = 49

The constant associated with the key code value (49) for the 1 key.

与 1 的键控代码值 (49) 关联的常数。

NUMBER_2: number = 50

The constant associated with the key code value (50) for the 2 key.

与 2 的键控代码值 (50) 关联的常数。

NUMBER_3: number = 51

The constant associated with the key code value (51) for the 3 key.

与 3 的键控代码值 (51) 关联的常数。

NUMBER_4: number = 52

The constant associated with the key code value (52) for the 4 key.

与 4 的键控代码值 (52) 关联的常数。

NUMBER_5: number = 53

The constant associated with the key code value (53) for the 5 key.

与 5 的键控代码值 (53) 关联的常数。

NUMBER_6: number = 54

The constant associated with the key code value (54) for the 6 key.

与 6 的键控代码值 (54) 关联的常数。

NUMBER_7: number = 55

The constant associated with the key code value (55) for the 7 key.

与 7 的键控代码值 (55) 关联的常数。

NUMBER_8: number = 56

The constant associated with the key code value (56) for the 8 key.

与 8 的键控代码值 (56) 关联的常数。

NUMBER_9: number = 57

The constant associated with the key code value (57) for the 9 key.

与 9 的键控代码值 (57) 关联的常数。

NUMPAD: number = 21

The constant associated with the pseudo key code (21) for the numeric keypad.

与数字键盘的伪键控代码 (21) 关联的常数。

NUMPAD_0: number = 96

The constant associated with the key code value (96) for the number 0 on the numeric keypad.

与数字键盘上的数字 0 的键控代码值 (96) 关联的常数。

NUMPAD_1: number = 97

The constant associated with the key code value (97) for the number 1 on the numeric keypad.

与数字键盘上的数字 1 的键控代码值 (97) 关联的常数。

NUMPAD_2: number = 98

The constant associated with the key code value (98) for the number 2 on the numeric keypad.

与数字键盘上的数字 2 的键控代码值 (98) 关联的常数。

NUMPAD_3: number = 99

The constant associated with the key code value (99) for the number 3 on the numeric keypad.

与数字键盘上的数字 3 的键控代码值 (99) 关联的常数。

NUMPAD_4: number = 100

The constant associated with the key code value (100) for the number 4 on the numeric keypad.

与数字键盘上的数字 4 的键控代码值 (100) 关联的常数。

NUMPAD_5: number = 101

The constant associated with the key code value (101) for the number 5 on the numeric keypad.

与数字键盘上的数字 5 的键控代码值 (101) 关联的常数。

NUMPAD_6: number = 102

The constant associated with the key code value (102) for the number 6 on the numeric keypad.

与数字键盘上的数字 6 的键控代码值 (102) 关联的常数。

NUMPAD_7: number = 103

The constant associated with the key code value (103) for the number 7 on the numeric keypad.

与数字键盘上的数字 7 的键控代码值 (103) 关联的常数。

NUMPAD_8: number = 104

The constant associated with the key code value (104) for the number 8 on the numeric keypad.

与数字键盘上的数字 8 的键控代码值 (104) 关联的常数。

NUMPAD_9: number = 105

The constant associated with the key code value (105) for the number 9 on the numeric keypad.

与数字键盘上的数字 9 的键控代码值 (105) 关联的常数。

NUMPAD_ADD: number = 107

The constant associated with the key code value (107) for the plus sign (+) on the numeric keypad.

与数字键盘上的加号 (+) 的键控代码值 (107) 关联的常数。

NUMPAD_DECIMAL: number = 110

The constant associated with the key code value (110) for the decimal point (.) on the numeric keypad.

与数字键盘上的小数点 (.) 的键控代码值 (110) 关联的常数。

NUMPAD_DIVIDE: number = 111

The constant associated with the key code value (111) for the division sign (/) on the numeric keypad.

与数字键盘上的除号 (/) 的键控代码值 (111) 关联的常数。

NUMPAD_ENTER: number = 108

The constant associated with the key code value (108) for the Enter key on the numeric keypad.

与数字键盘上的 Enter 的键控代码值 (108) 关联的常数。

NUMPAD_MULTIPLY: number = 106

The constant associated with the key code value (106) for the multiplication sign (*) on the numeric keypad.

与数字键盘上的乘号 (*) 的键控代码值 (106) 关联的常数。

NUMPAD_SUBTRACT: number = 109

The constant associated with the key code value (109) for the minus sign (-) on the numeric keypad.

与数字键盘上的减号 (-) 的键控代码值 (109) 关联的常数。

O: number = 79

The constant associated with the key code value (79) for the O key.

与 O 键的键控代码值 (79) 关联的常数。

P: number = 80

The constant associated with the key code value (80) for the P key.

与 P 键的键控代码值 (80) 关联的常数。

PAGE_DOWN: number = 34

The constant associated with the key code value (34) for the Page Down key.

与 Page Down 的键控代码值 (34) 关联的常数。

PAGE_UP: number = 33

The constant associated with the key code value (33) for the Page Up key.

与 Page Up 的键控代码值 (33) 关联的常数。

PERIOD: number = 190

The constant associated with the key code value (190) for the period (.) key.

与 . 键的键控代码值 (190) 关联的常数。

Q: number = 81

The constant associated with the key code value (81) for the Q key.

与 Q 键的键控代码值 (81) 关联的常数。

QUOTE: number = 222

The constant associated with the key code value (222) for the single quote (') key.

与 ' 键的键控代码值 (222) 关联的常数。

R: number = 82

The constant associated with the key code value (82) for the R key.

与 R 键的键控代码值 (82) 关联的常数。

RIGHT: number = 39

The constant associated with the key code value (39) for the Right Arrow key.

与向右箭头键的键控代码值 (39) 关联的常数。

RIGHTBRACKET: number = 221

The constant associated with the key code value (221) for the right bracket (]) key.

与 ] 键的键控代码值 (221) 关联的常数。

S: number = 83

The constant associated with the key code value (83) for the S key.

与 S 键的键控代码值 (83) 关联的常数。

SEMICOLON: number = 186

The constant associated with the key code value (186) for the semicolon (;) key.

与 ; 键的键控代码值 (186) 关联的常数。

SHIFT: number = 16

The constant associated with the key code value (16) for the Shift key.

与 Shift 的键控代码值 (16) 关联的常数。

SLASH: number = 191

The constant associated with the key code value (191) for the forward slash (/) key.

与 / 键的键控代码值 (191) 关联的常数。

SPACE: number = 32

The constant associated with the key code value (32) for the Spacebar.

与空格键的键控代码值 (32) 关联的常数。

T: number = 84

The constant associated with the key code value (84) for the T key.

与 T 键的键控代码值 (84) 关联的常数。

TAB: number = 9

The constant associated with the key code value (9) for the Tab key.

与 Tab 的键控代码值 (9) 关联的常数。

U: number = 85

The constant associated with the key code value (85) for the U key.

与 U 键的键控代码值 (85) 关联的常数。

UP: number = 38

The constant associated with the key code value (38) for the Up Arrow key.

与向上箭头键的键控代码值 (38) 关联的常数。

V: number = 86

The constant associated with the key code value (86) for the V key.

与 V 键的键控代码值 (86) 关联的常数。

W: number = 87

The constant associated with the key code value (87) for the W key.

与 W 键的键控代码值 (87) 关联的常数。

X: number = 88

The constant associated with the key code value (88) for the X key.

与 X 键的键控代码值 (88) 关联的常数。

Y: number = 89

The constant associated with the key code value (89) for the Y key.

与 Y 键的键控代码值 (89) 关联的常数。

Z: number = 90

The constant associated with the key code value (90) for the Z key.

与 Z 键的键控代码值 (90) 关联的常数。

MMNEPVFCICPMFPCPTTAAATR