[WM] 按鍵對應碼整理 (KetEvent)

摘要:WM 按鍵相關對應碼總整理

Hexadecimal valueWindows Embedded CE constantShared Windows Mobile constantWindows Mobile purpose
0x08VK_BACKVK_TBACKBack.
0x0DVK_RETURNVK_TACTIONAction.
0x25VK_LEFTVK_TLEFT Left.
0x26VK_UPVK_TUPUp.
0x27VK_RIGHTVK_TRIGHTRight.
0x28VK_DOWNVK_TDOWNDown.
0x5BVK_LWINVK_THOMEHome screen or Today screen
0x70VK_F1VK_TSOFT1Softkey 1.
0x71VK_F2VK_TSOFT2Softkey 2.
0x72VK_F3VK_TTALKTalk
0x73VK_F4VK_TENDEnd
0x75VK_F6VK_TVOLUMEUPVolume Up.
0x76VK_F7VK_TVOLUMEDOWNVolume Down.
0x77VK_F8VK_TSTAR*
0x78VK_F9VK_TPOUND#
0x79VK_F10VK_TRECORDRecord.
0x7AVK_F11VK_SYMBOLSymbol (SYM) key.
0x7EVK_F15VK_END_ALL_DATA_CALLSDisconnects all data calls without affecting the status of voice calls.
0x7FVK_F16VK_TSPEAKERPHONE_TOGGLEToggles speakerphone on and off.
0x80VK_F17VK_TFLIPFlip.
0x81VK_F18VK_TPOWERPower.
0x82VK_F19VK_REDKEYSent by a keypad that has a special red function key.
0x83VK_F20VK_ROCKERArrow keys came from a Rocker.
0x84VK_F21VK_DPADArrow keys came from a d–pad.
0x85VK_F22VK_KEYLOCKKey used to lock device.
0x86VK_F23VK_ACTIONSent with VK_RETURN when doing Action on Windows Mobile 6 Classic rockers.
0x87VK_F24VK_VOICEDIALKey used to kick off voice dial recognition.

 

Windows Mobile constantHexadecimal valuePurpose

VK_DONE

VK_RWIN + VK_F6

<OK/Close> hotkey code.

MOD_DONE

(MOD_WIN | MOD_KEYUP)

<OK/Close> hotkey modifiers

VK_MOJI

VK_RWIN + VK_F7

Key used to switch between East Asian language layouts.

MOD_MOJI

(MOD_WIN | MOD_KEYUP)

Modifiers so MOJI goes to the shell.

 

 

Hexadecimal valueWindows Embedded CE constantWindows Mobile constant

0x30

VK_0

VK_T0

0x31

VK_1

VK_T1

0x32

VK_2

VK_T2

0x33

VK_3

VK_T3

0x34

VK_4

VK_T4

0x35

VK_5

VK_T5

0x36

VK_6

VK_T6

0x37

VK_7

VK_T7

0x38

VK_8

VK_T8

0x39

VK_9

VK_T9

 

 Virtual key codes in Windows Embedded CE
 
Symbolic constantHexadecimal valueAdditional mapping defined for Windows Mobile Mouse or keyboard equivalent

VK_LBUTTON

0x01

 

Left mouse button.

VK_RBUTTON

0x02

 

Right mouse button.

VK_CANCEL

0x03

 

Control–break processing.

VK_MBUTTON

0x04

 

Middle mouse button on a three–button mouse.

 

0x05–0x07

 

Undefined.

VK_BACK

0x08

BACKSPACE key.

VK_TAB

0x09

 

TAB key.

 

0x0A–0x0B

 

Undefined.

VK_CLEAR

0x0C

 

CLEAR key.

VK_RETURN

0x0D

 

ENTER key.

 

0x0E–0x0F

 

Undefined.

VK_SHIFT

0x10

 

SHIFT key.

VK_CONTROL

0x11

 

CTRL key.

VK_MENU

0x12

 

ALT key.

VK_PAUSE

0x13

 

PAUSE key.

VK_CAPITAL

0x14

 

CAPS LOCK key.

 

0x15–0x19

 

Reserved for Kanji systems.

 

0x1A

 

Undefined.

VK_ESCAPE

0x1B

 

ESC key.

 

0x1C–0x1F

 

Reserved for Kanji systems.

VK_SPACE

0x20

 

SPACEBAR.

VK_PRIOR

0x21

 

PAGE UP key.

VK_NEXT

0x22

 

PAGE DOWN key.

VK_END

0x23

 

END key.

VK_HOME

0x24

 

HOME key.

VK_LEFT

0x25

LEFT ARROW key.

VK_UP

0x26

UP ARROW key.

VK_RIGHT

0x27

RIGHT ARROW key.

VK_DOWN

0x28

DOWN ARROW key.

VK_SELECT

0x29

 

SELECT key.

 

0x2A

 

Specific to OEM.

VK_EXECUTE

0x2B

 

EXECUTE key.

VK_SNAPSHOT

0x2C

 

PRINT SCREEN key.

VK_INSERT

0x2D

 

INS key.

VK_DELETE

0x2E

 

DEL key.

VK_HELP

0x2F

 

HELP key.

 

0x3A–0x40

 

Undefined.

VK_LWIN

0x5B

Left Windows key on a Microsoft Natural Keyboard.

VK_RWIN

0x5C

 

Right Windows key on a Microsoft Natural Keyboard.

VK_APPS

0x5D

 

Applications key on a Microsoft Natural Keyboard.

 

0x5E–0x5F

 

Undefined

VK_NUMPAD0

0x60

 

Numeric keypad 0 key.

VK_NUMPAD1

0x61

 

Numeric keypad 1 key.

VK_NUMPAD2

0x62

 

Numeric keypad 2 key.

VK_NUMPAD3

0x63

 

Numeric keypad 3 key.

VK_NUMPAD4

0x64

 

Numeric keypad 4 key.

VK_NUMPAD5

0x65

 

Numeric keypad 5 key.

VK_NUMPAD6

0x66

 

Numeric keypad 6 key.

VK_NUMPAD7

0x67

 

Numeric keypad 7 key.

VK_NUMPAD8

0x68

 

Numeric keypad 8 key.

VK_NUMPAD9

0x69

 

Numeric keypad 9 key.

VK_MULTIPLY

0x6A

 

Multiply key.

VK_ADD

0x6B

 

Add key.

VK_SEPARATOR

0x6C

 

Separator key.

VK_SUBTRACT

0x6D

 

Subtract key.

VK_DECIMAL

0x6E

 

Decimal key.

VK_DIVIDE

0x6F

 

Divide key.

VK_F1

0x70

F1 key.

VK_F2

0x71

F2 key.

VK_F3

0x72

F3 key.

VK_F4

0x73

F4 key.

VK_F5

0x74

 

F5 key.

VK_F6

0x75

F6 key.

VK_F7

0x76

F7 key.

VK_F8

0x77

F8 key.

VK_F9

0x78

F9 key.

VK_F10

0x79

F10 key.

VK_F11

0x7A

F11 key.

VK_F12

0x7B

 

F12 key.

VK_F13

0x7C

 

F13 key.

VK_F14

0x7D

 

F14 key.

VK_F15

0x7E

F15 key.

VK_F16

0x7F

F16 key.

VK_F17

0x80

F17 key.

VK_F18

0x81

F18 key.

VK_F19

0x82

F19 key.

VK_F20

0x83

F20 key.

VK_F21

0x84

F21 key.

VK_F22

0x85

F22 key.

Key used to lock device.

VK_F23

0x86

F23 key.

VK_F24

0x87

F24 key.

 

 

0x89–0x8F

 

Unassigned.

VK_NUMLOCK

0x90

 

NUM LOCK key.

VK_SCROLL

0x91

 

SCROLL LOCK key.

VK_LSHIFT

0xA0

 

Left SHIFT.

VK_RSHIFT

0xA1

 

Right SHIFT.

VK_LCONTROL

0xA2

 

Left CTRL.

VK_RCONTROL

0xA3

 

Right CTRL.

VK_LMENU

0xA4

 

Left ALT.

VK_RMENU

0xA5

 

Right ALT.

 

0xBA–0xC0

 

Specific to OEM; reserved. See following tables.

 

0xC1–0xDA

0xC1–0xC6

Unassigned.

 

0xDB–0xDE

 

Specific to OEM; reserved. See following tables.

VK_OFF

0xDF

 

Used to power the device on and off. No keyboard equivalent.

 

0xE1–0xE4

 

Specific to OEM.

 

0xE5

 

Unassigned.

 

0xE6

 

Specific to OEM.

VK_PACKET

0xE7

 

Used to pass Unicode characters as if they were keystrokes. If VK_PACKET is used with SendInput, then the Unicode character to be delivered should be placed into the lower 16 bits of the scan code. If a keyboard message is removed from the message queue and the virtual key is VK_PACKET, then the Unicode character will be the upper 16 bits of the lparam.

 

0xE8

 

Unassigned.

 

0xE9–0xF5

 

Specific to OEM.

VK_ATTN

0xF6

 

ATTN key.

VK_CRSEL

0xF7

 

CRSEL key.

VK_EXSEL

0xF8

 

EXSEL key.

VK_EREOF

0xF9

 

Erase EOF key.

VK_PLAY

0xFA

 

PLAY key.

VK_ZOOM

0xFB

 

ZOOM key.

VK_NONAME

0xFC

 

Reserved for future use.

VK_PA1

0xFD

 

PA1 key.

VK_OEM_CLEAR

0xFE

 

CLEAR key.

VK_KEYLOCK

0xF22

 

Key used to lock device.

Symbolic constantHexadecimal valueMouse or keyboard equivalent

VK_OEM_SCROLL

0x91

None.

VK_OEM_1

0xBA

";:" for US.

VK_OEM_PLUS

0xBB

"+" any country/region.

VK_OEM_COMMA

0xBC

"," any country/region.

VK_OEM_MINUS

0xBD

"-" any country/region.

VK_OEM_PERIOD

0xBE

"." any country/region.

VK_OEM_2

0xBF

"/?" for US.

VK_OEM_3

0xC0

"`~" for US.

VK_OEM_4

0xDB

"[{" for US.

VK_OEM_5

0xDC

"\|" for US.

VK_OEM_6

0xDD

"]}" for US

VK_OEM_7

0xDE

"'"" for US.

VK_OEM_8

0xDF

None. By default, this is equivalent to VK_OFF.

VK_OEM_AX

0xE1

AX key on Japanese AX keyboard.

VK_OEM_102

0xE2

"<>" or "\|" on RT 102-key keyboard.

 

Symbolic constantHexadecimal valueDescription

VK_DBE_ALPHANUMERIC

0x0f0

Changes the mode to alphanumeric.

VK_DBE_KATAKANA

0x0f1

Changes the mode to Katakana.

VK_DBE_HIRAGANA

0x0f2

Changes the mode to Hiragana.

VK_DBE_SBCSCHAR

0x0f3

Changes the mode to single–byte characters.

VK_DBE_DBCSCHAR

0x0f4

Changes the mode to double–byte characters.

VK_DBE_ROMAN

0x0f5

Changes the mode to Roman characters.

VK_DBE_NOROMAN

0x0f6

Changes the mode to non–Roman characters.

VK_DBE_ENTERWORDREGISTERMODE

0x0f7

Activates the word registration dialog box.

VK_DBE_ENTERIMECONFIGMODE

0x0f8

Activates a dialog box for setting up an IME environment.

VK_DBE_FLUSHSTRING

0x0f9

Deletes the undetermined string without determining it.

VK_DBE_CODEINPUT

0x0fa

Changes the mode to code input.

VK_DBE_NOCODEINPUT

0x0fb

Changes the mode to no-code input.

 

Soft keyDevice VK codeEmulator VK code

Left soft key (SK1)

VK_SOFT1

VK_F1

Right soft key (SK2)

VK_SOFT2

VK_F2

 

分享是一種美德 ~~~~~~~~~~~~~~~~~