Thursday, October 14, 2010

Virtual-Key Codes for quick macro(按鍵精靈)

These keycodes can be used in plugin.window.sendkeypress / sendkeyup / sendkeydown

http://msdn.microsoft.com/en-us/library/dd375731%28v=VS.85%29.aspx

VK_LBUTTON
0x01

Left mouse button

VK_RBUTTON
0x02

Right mouse button

VK_CANCEL
0x03

Control-break processing

VK_MBUTTON
0x04

Middle mouse button (three-button mouse)

VK_XBUTTON1
0x05

X1 mouse button

VK_XBUTTON2
0x06

X2 mouse button

-
0x07

Undefined

VK_BACK
0x08

BACKSPACE key

VK_TAB
0x09

TAB key

-
0x0A-0B

Reserved

VK_CLEAR
0x0C

CLEAR key

VK_RETURN
0x0D

ENTER key

-
0x0E-0F

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

VK_KANA
0x15

IME Kana mode

VK_HANGUEL
0x15

IME Hanguel mode (maintained for compatibility; use VK_HANGUL)

VK_HANGUL
0x15

IME Hangul mode

-
0x16

Undefined

VK_JUNJA
0x17

IME Junja mode

VK_FINAL
0x18

IME final mode

VK_HANJA
0x19

IME Hanja mode

VK_KANJI
0x19

IME Kanji mode

-
0x1A

Undefined

VK_ESCAPE
0x1B

ESC key

VK_CONVERT
0x1C

IME convert

VK_NONCONVERT
0x1D

IME nonconvert

VK_ACCEPT
0x1E

IME accept

VK_MODECHANGE
0x1F

IME mode change request

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

VK_PRINT
0x2A

PRINT key

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