Sunteți pe pagina 1din 8

Key Code Constants

Page 1 of 4

Visual Basic Reference

Key Code Constants


See Also
Key Codes
Constant vbKeyLButton vbKeyRButton vbKeyCancel vbKeyMButton vbKeyBack vbKeyTab vbKeyClear vbKeyReturn vbKeyShift vbKeyControl vbKeyMenu vbKeyPause vbKeyCapital vbKeyEscape vbKeySpace vbKeyPageUp vbKeyPageDown vbKeyEnd vbKeyHome vbKeyLeft vbKeyUp vbKeyRight vbKeyDown vbKeySelect vbKeyPrint vbKeyExecute Value 1 2 3 4 8 9 12 13 16 17 18 19 20 27 32 33 34 35 36 37 38 39 40 41 42 43 Description Left mouse button Right mouse button CANCEL key Middle mouse button BACKSPACE key TAB key CLEAR key ENTER key SHIFT key CTRL key MENU key PAUSE key CAPS LOCK key ESC key SPACEBAR key PAGE UP key PAGE DOWN key END key HOME key LEFT ARROW key UP ARROW key RIGHT ARROW key DOWN ARROW key SELECT key PRINT SCREEN key EXECUTE key

mk:@MSITStore:C:\Program%20Files\Microsoft%20Visual%20Studio\MSDN\2... 16/02/2004

Key Code Constants

Page 2 of 4

vbKeySnapshot vbKeyInsert vbKeyDelete vbKeyHelp vbKeyNumlock

44 45 46 47 144

SNAPSHOT key INS key DEL key HELP key NUM LOCK key

KeyA Through KeyZ Are the Same as Their ASCII Equivalents: 'A' Through 'Z'
Constant vbKeyA vbKeyB vbKeyC vbKeyD vbKeyE vbKeyF vbKeyG vbKeyH vbKeyI vbKeyJ vbKeyK vbKeyL vbKeyM vbKeyN vbKeyO vbKeyP vbKeyQ vbKeyR vbKeyS vbKeyT vbKeyU vbKeyV vbKeyW vbKeyX Value 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 Description A key B key C key D key E key F key G key H key I key J key K key L key M key N key O key P key Q key R key S key T key U key V key W key X key

mk:@MSITStore:C:\Program%20Files\Microsoft%20Visual%20Studio\MSDN\2... 16/02/2004

Key Code Constants

Page 3 of 4

vbKeyY vbKeyZ

89 90

Y key Z key

Key0 Through Key9 Are the Same as Their ASCII Equivalents: '0' Through '9
Constant vbKey0 vbKey1 vbKey2 vbKey3 vbKey4 vbKey5 vbKey6 vbKey7 vbKey8 vbKey9 Value 48 49 50 51 52 53 54 55 56 57 Description 0 key 1 key 2 key 3 key 4 key 5 key 6 key 7 key 8 key 9 key

Keys on the Numeric Keypad


Constant vbKeyNumpad0 vbKeyNumpad1 vbKeyNumpad2 vbKeyNumpad3 vbKeyNumpad4 vbKeyNumpad5 vbKeyNumpad6 vbKeyNumpad7 vbKeyNumpad8 vbKeyNumpad9 vbKeyMultiply vbKeyAdd vbKeySeparator vbKeySubtract Value 96 97 98 99 100 101 102 103 104 105 106 107 108 109 Description 0 key 1 key 2 key 3 key 4 key 5 key 6 key 7 key 8 key 9 key MULTIPLICATION SIGN (*) key PLUS SIGN (+) key ENTER (keypad) key MINUS SIGN (-) key

mk:@MSITStore:C:\Program%20Files\Microsoft%20Visual%20Studio\MSDN\2... 16/02/2004

Key Code Constants

Page 4 of 4

vbKeyDecimal vbKeyDivide

110 111

DECIMAL POINT(.) key DIVISION SIGN (/) key

Function Keys
Constant vbKeyF1 vbKeyF2 vbKeyF3 vbKeyF4 vbKeyF5 vbKeyF6 vbKeyF7 vbKeyF8 vbKeyF9 vbKeyF10 vbKeyF11 vbKeyF12 vbKeyF13 vbKeyF14 vbKeyF15 vbKeyF16 Value 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 Description F1 key F2 key F3 key F4 key F5 key F6 key F7 key F8 key F9 key F10 key F11 key F12 key F13 key F14 key F15 key F16 key

Send feedback to MSDN. Look here for MSDN Online resources.

mk:@MSITStore:C:\Program%20Files\Microsoft%20Visual%20Studio\MSDN\2... 16/02/2004

Key Code Constants

Page 1 of 4

Visual Basic Reference

Key Code Constants


See Also
Key Codes
Constant vbKeyLButton vbKeyRButton vbKeyCancel vbKeyMButton vbKeyBack vbKeyTab vbKeyClear vbKeyReturn vbKeyShift vbKeyControl vbKeyMenu vbKeyPause vbKeyCapital vbKeyEscape vbKeySpace vbKeyPageUp vbKeyPageDown vbKeyEnd vbKeyHome vbKeyLeft vbKeyUp vbKeyRight vbKeyDown vbKeySelect vbKeyPrint vbKeyExecute Value 1 2 3 4 8 9 12 13 16 17 18 19 20 27 32 33 34 35 36 37 38 39 40 41 42 43 Description Left mouse button Right mouse button CANCEL key Middle mouse button BACKSPACE key TAB key CLEAR key ENTER key SHIFT key CTRL key MENU key PAUSE key CAPS LOCK key ESC key SPACEBAR key PAGE UP key PAGE DOWN key END key HOME key LEFT ARROW key UP ARROW key RIGHT ARROW key DOWN ARROW key SELECT key PRINT SCREEN key EXECUTE key

mk:@MSITStore:C:\Program%20Files\Microsoft%20Visual%20Studio\MSDN\2... 16/02/2004

Key Code Constants

Page 2 of 4

vbKeySnapshot vbKeyInsert vbKeyDelete vbKeyHelp vbKeyNumlock

44 45 46 47 144

SNAPSHOT key INS key DEL key HELP key NUM LOCK key

KeyA Through KeyZ Are the Same as Their ASCII Equivalents: 'A' Through 'Z'
Constant vbKeyA vbKeyB vbKeyC vbKeyD vbKeyE vbKeyF vbKeyG vbKeyH vbKeyI vbKeyJ vbKeyK vbKeyL vbKeyM vbKeyN vbKeyO vbKeyP vbKeyQ vbKeyR vbKeyS vbKeyT vbKeyU vbKeyV vbKeyW vbKeyX Value 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 Description A key B key C key D key E key F key G key H key I key J key K key L key M key N key O key P key Q key R key S key T key U key V key W key X key

mk:@MSITStore:C:\Program%20Files\Microsoft%20Visual%20Studio\MSDN\2... 16/02/2004

Key Code Constants

Page 3 of 4

vbKeyY vbKeyZ

89 90

Y key Z key

Key0 Through Key9 Are the Same as Their ASCII Equivalents: '0' Through '9
Constant vbKey0 vbKey1 vbKey2 vbKey3 vbKey4 vbKey5 vbKey6 vbKey7 vbKey8 vbKey9 Value 48 49 50 51 52 53 54 55 56 57 Description 0 key 1 key 2 key 3 key 4 key 5 key 6 key 7 key 8 key 9 key

Keys on the Numeric Keypad


Constant vbKeyNumpad0 vbKeyNumpad1 vbKeyNumpad2 vbKeyNumpad3 vbKeyNumpad4 vbKeyNumpad5 vbKeyNumpad6 vbKeyNumpad7 vbKeyNumpad8 vbKeyNumpad9 vbKeyMultiply vbKeyAdd vbKeySeparator vbKeySubtract Value 96 97 98 99 100 101 102 103 104 105 106 107 108 109 Description 0 key 1 key 2 key 3 key 4 key 5 key 6 key 7 key 8 key 9 key MULTIPLICATION SIGN (*) key PLUS SIGN (+) key ENTER (keypad) key MINUS SIGN (-) key

mk:@MSITStore:C:\Program%20Files\Microsoft%20Visual%20Studio\MSDN\2... 16/02/2004

Key Code Constants

Page 4 of 4

vbKeyDecimal vbKeyDivide

110 111

DECIMAL POINT(.) key DIVISION SIGN (/) key

Function Keys
Constant vbKeyF1 vbKeyF2 vbKeyF3 vbKeyF4 vbKeyF5 vbKeyF6 vbKeyF7 vbKeyF8 vbKeyF9 vbKeyF10 vbKeyF11 vbKeyF12 vbKeyF13 vbKeyF14 vbKeyF15 vbKeyF16 Value 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 Description F1 key F2 key F3 key F4 key F5 key F6 key F7 key F8 key F9 key F10 key F11 key F12 key F13 key F14 key F15 key F16 key

Send feedback to MSDN. Look here for MSDN Online resources.

mk:@MSITStore:C:\Program%20Files\Microsoft%20Visual%20Studio\MSDN\2... 16/02/2004