当前位置: 技术问答>java相关
在java中,各鍵对应的代码为什么?
来源: 互联网 发布时间:2015-09-12
本文导语: 各鍵对应的代码为什么?。怎么知道? | 空格: 32 回车: 10 退格: 8 Shift: 16 Esc: 27 cAPS lOCK: 20 Alt: 18 Ctrl: 17 Page up: 33 Page down: 34 en...
各鍵对应的代码为什么?。怎么知道?
|
空格: 32
回车: 10
退格: 8
Shift: 16
Esc: 27
cAPS lOCK: 20
Alt: 18
Ctrl: 17
Page up: 33
Page down: 34
end: 35
home 36
insert: 155
Delete: 127
up: 38
down: 40
left: 37
right: 39
F1:112
F2:113
F3:114
F4:115
F5:116
F6:117
F7:118
F8:119
F9:120
F10:121
F11:122
F12:123
回车: 10
退格: 8
Shift: 16
Esc: 27
cAPS lOCK: 20
Alt: 18
Ctrl: 17
Page up: 33
Page down: 34
end: 35
home 36
insert: 155
Delete: 127
up: 38
down: 40
left: 37
right: 39
F1:112
F2:113
F3:114
F4:115
F5:116
F6:117
F7:118
F8:119
F9:120
F10:121
F11:122
F12:123
|
就在JDK文档里,自己查吧
static char CHAR_UNDEFINED
KEY_PRESSED and KEY_RELEASED events which do not map to a valid Unicode character use this for the keyChar value.
static int KEY_FIRST
The first number in the range of ids used for key events.
static int KEY_LAST
The last number in the range of ids used for key events.
static int KEY_LOCATION_LEFT
A constant indicating that the key pressed or released is in the left key location (there is more than one possible location for this key).
static int KEY_LOCATION_NUMPAD
A constant indicating that the key event originated on the numeric keypad or with a virtual key corresponding to the numeric keypad.
static int KEY_LOCATION_RIGHT
A constant indicating that the key pressed or released is in the right key location (there is more than one possible location for this key).
static int KEY_LOCATION_STANDARD
A constant indicating that the key pressed or released is not distinguished as the left or right version of a key, and did not originate on the numeric keypad (or did not originate with a virtual key corresponding to the numeric keypad).
static int KEY_LOCATION_UNKNOWN
A constant indicating that the keyLocation is indeterminate or not relevant.
static int KEY_PRESSED
The "key pressed" event.
static int KEY_RELEASED
The "key released" event.
static int KEY_TYPED
The "key typed" event.
static int VK_0
VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39)
static int VK_A
VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A)
static int VK_ACCEPT
Constant for the Accept or Commit function key.
static int VK_ADD
static int VK_AGAIN
static int VK_ALL_CANDIDATES
Constant for the All Candidates function key.
static int VK_ALPHANUMERIC
Constant for the Alphanumeric function key.
static int VK_ALT
static int VK_ALT_GRAPH
Constant for the AltGraph function key.
static int VK_AMPERSAND
static int VK_ASTERISK
static int VK_AT
Constant for the "@" key.
static int VK_B
static int VK_BACK_QUOTE
static int VK_BACK_SLASH
static int VK_BACK_SPACE
static int VK_BRACELEFT
static int VK_BRACERIGHT
static int VK_C
static int VK_CANCEL
static int VK_CAPS_LOCK
static int VK_CIRCUMFLEX
Constant for the "^" key.
static int VK_CLEAR
static int VK_CLOSE_BRACKET
static int VK_CODE_INPUT
Constant for the Code Input function key.
static int VK_COLON
Constant for the ":" key.
static int VK_COMMA
static int VK_COMPOSE
Constant for the Compose function key.
static int VK_CONTROL
static char CHAR_UNDEFINED
KEY_PRESSED and KEY_RELEASED events which do not map to a valid Unicode character use this for the keyChar value.
static int KEY_FIRST
The first number in the range of ids used for key events.
static int KEY_LAST
The last number in the range of ids used for key events.
static int KEY_LOCATION_LEFT
A constant indicating that the key pressed or released is in the left key location (there is more than one possible location for this key).
static int KEY_LOCATION_NUMPAD
A constant indicating that the key event originated on the numeric keypad or with a virtual key corresponding to the numeric keypad.
static int KEY_LOCATION_RIGHT
A constant indicating that the key pressed or released is in the right key location (there is more than one possible location for this key).
static int KEY_LOCATION_STANDARD
A constant indicating that the key pressed or released is not distinguished as the left or right version of a key, and did not originate on the numeric keypad (or did not originate with a virtual key corresponding to the numeric keypad).
static int KEY_LOCATION_UNKNOWN
A constant indicating that the keyLocation is indeterminate or not relevant.
static int KEY_PRESSED
The "key pressed" event.
static int KEY_RELEASED
The "key released" event.
static int KEY_TYPED
The "key typed" event.
static int VK_0
VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39)
static int VK_A
VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A)
static int VK_ACCEPT
Constant for the Accept or Commit function key.
static int VK_ADD
static int VK_AGAIN
static int VK_ALL_CANDIDATES
Constant for the All Candidates function key.
static int VK_ALPHANUMERIC
Constant for the Alphanumeric function key.
static int VK_ALT
static int VK_ALT_GRAPH
Constant for the AltGraph function key.
static int VK_AMPERSAND
static int VK_ASTERISK
static int VK_AT
Constant for the "@" key.
static int VK_B
static int VK_BACK_QUOTE
static int VK_BACK_SLASH
static int VK_BACK_SPACE
static int VK_BRACELEFT
static int VK_BRACERIGHT
static int VK_C
static int VK_CANCEL
static int VK_CAPS_LOCK
static int VK_CIRCUMFLEX
Constant for the "^" key.
static int VK_CLEAR
static int VK_CLOSE_BRACKET
static int VK_CODE_INPUT
Constant for the Code Input function key.
static int VK_COLON
Constant for the ":" key.
static int VK_COMMA
static int VK_COMPOSE
Constant for the Compose function key.
static int VK_CONTROL
|
java.awt.event.KeyEvent.VK_????