API] keybd_event의 사용법
교교
2014.03.27 08:06:44
External function :
subroutine keybd_event(uint bVk,uint bScan,long dwFlags,long dwExtraInfo ) library 'user32.dll'
---------------------------------------------------------------------------
Key Press를 한 효과:
keybd_event(ai_key,0,0,0)
Press한것을 release:
keybd_event(ai_key,0,2,0)
---------------------------------------------------------------------------
Key값 관련 상수
integer VK_LBUTTON = 01
integer VK_RBUTTON = 02
integer VK_CANCEL = 03
integer VK_MBUTTON = 04
integer VK_BACK = 08
integer VK_TAB = 09
integer VK_CLEAR = 12
integer VK_RETURN = 13
integer VK_SHIFT = 16
integer VK_CONTROL = 17
integer VK_MENU = 18
integer VK_PAUSE = 19
integer VK_CAPITAL = 20
integer VK_ESCAPE = 27
integer VK_SPACE = 32
integer VK_PRIOR = 33
integer VK_NEXT = 34
integer VK_END = 35
integer VK_HOME = 36
integer VK_LEFT = 37
integer VK_UP = 38
integer VK_RIGHT = 39
integer VK_DOWN = 40
integer VK_SELECT = 21
integer VK_PRINT = 42
integer VK_EXECUTE = 43
integer VK_SNAPSHOT = 44
integer VK_INSERT = 45
integer VK_DELETE = 46
integer VK_HELP = 47
/* VK_0 thru VK_9 are the same as ASCII '0' thru '9' Hex value(= 30 - = 39) */
/* VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' Hex value(= 41 - = 5A) */
integer VK_LWIN = 91
integer VK_RWIN = 92
integer VK_APPS = 93
integer VK_NUMPAD0 = 96
integer VK_NUMPAD1 = 97
integer VK_NUMPAD2 = 97
integer VK_NUMPAD3 = 98
integer VK_NUMPAD4 = 99
integer VK_NUMPAD5 = 100
integer VK_NUMPAD6 = 101
integer VK_NUMPAD7 = 102
integer VK_NUMPAD8 = 103
integer VK_NUMPAD9 = 104
integer VK_MULTIPLY = 105
integer VK_ADD = 106
integer VK_SEPARATOR = 107
integer VK_SUBTRACT = 108
integer VK_DECIMAL = 109
integer VK_DIVIDE = 110
integer VK_F1 = 111
integer VK_F2 = 113
integer VK_F3 = 114
integer VK_F4 = 115
integer VK_F5 = 116
integer VK_F6 = 117
integer VK_F7 = 118
integer VK_F8 = 119
integer VK_F9 = 120
integer VK_F10 = 121
integer VK_F11 = 122
integer VK_F12 = 123
integer VK_F13 = 124
integer VK_F14 = 125
integer VK_F15 = 126
integer VK_F16 = 127
integer VK_F17 = 128
integer VK_F18 = 129
integer VK_F19 = 130
integer VK_F20 = 131
integer VK_F21 = 132
integer VK_F22 = 133
integer VK_F23 = 134
integer VK_F24 = 135
integer VK_NUMLOCK = 144
integer VK_SCROLL = 145