CodePudding user response:
Shift key keyflags 12 Ctrl key
3 Shift and Ctrl keys
IF keyflags=2 THEN
IF the key=KeyAdd! THEN
Beep (1)
END the IF
END the IF
CodePudding user response:
No, I want to achieve is to use a function or command is equal to me on the keyboard and press CTRL + '+', I've now realized the CTRL and other keys on the keyboard, but now I want to realize the CTRL and small keyboard that is the right of the numeric keys on the keyboard '+' or '-' or '*', I use the statement can achieve CTRL + space key, CTRL + '+', but not impossible to achieve, please helpKeybd_event (162, char (0), 0, 0)
Keybd_event (32, char (0), 0, 0)
Keybd_event (162, char (0), 2, 0)
Keybd_event (32, char (0), 2, 0)
CodePudding user response:
+ 107Here you can see the keyboard ascII
http://www.yxl.cn/Info/20060108, 172329066, 4. HTML
CodePudding user response:
Pressing the number lock...CodePudding user response:
Virtual Keys definedReference: C: \ Program Files \ Sybase \ Shared \ original concept \ cgen \ \ nt \ winuser h h
Among them: # define VK_ADD 0 x6b
Are on the small keyboard +, 0 x6b is converted to a decimal 107
/*
* Virtual Keys, Standard Set
*/
# define VK_LBUTTON 0 x01
# define VK_RBUTTON 0 x02
# define VK_CANCEL 0 x03
# define VK_MBUTTON 0 x04/* NOT contiguous with L & amp; RBUTTON */
# define VK_BACK 0 x08
# define VK_TAB 0 x09
# define VK_CLEAR 0 x0c
# define VK_RETURN 0 x0d
# define VK_SHIFT 0 x10
# define VK_CONTROL 0 x11
# define VK_MENU 0 x12
# define VK_PAUSE 0 x13
# define VK_CAPITAL 0 x14
# define VK_ESCAPE 0 x1b
# define VK_SPACE 0 x20
# define VK_PRIOR 0 x21
# define VK_NEXT 0 x22
# define VK_END 0 x23
# define VK_HOME 0 x24
# define VK_LEFT 0 x25
# define VK_UP 0 x26
# define VK_RIGHT 0 x27
# define VK_DOWN 0 x28
# define VK_SELECT 0 x29
# define VK_PRINT 0 x2a
# define VK_EXECUTE 0 x2b
# define VK_SNAPSHOT 0 x2c
# define VK_INSERT 0 x2d
# define VK_DELETE 0 x2e
# define VK_HELP 0 x2f
/* VK_0 thru VK_9 are the same as the ASCII '0' thru '9' (0 x30-0 x39) */
/* VK_A thru VK_Z are the same as the ASCII 'A' thru 'Z' (0 x41-0 x5a) */
# define VK_LWIN 0 x5b
# define VK_RWIN 0 x5c
# define VK_APPS 0 x5d
# define VK_NUMPAD0 0 x60
# define VK_NUMPAD1 0 x61
# define VK_NUMPAD2 0 x62
# define VK_NUMPAD3 0 x63
# define VK_NUMPAD4 0 x64
# define VK_NUMPAD5 0 x65
# define VK_NUMPAD6 0 x66
# define VK_NUMPAD7 0 x67
# define VK_NUMPAD8 0 x68
# define VK_NUMPAD9 0 x69
# define VK_MULTIPLY 0 x6a
# define VK_ADD 0 x6b
# define VK_SEPARATOR 0 x6c
# define VK_SUBTRACT 0 x6d
# define VK_DECIMAL 0 x6e
# define VK_DIVIDE 0 x6f
# define VK_F1 0 x70
# define VK_F2 0 x71
# define VK_F3 0 x72
# define VK_F4 0 x73
# define VK_F5 0 x74
# define VK_F6 0 x75
# define VK_F7 0 x76
# define VK_F8 0 x77
# define VK_F9 0 x78
# define VK_F10 0 x79
# define VK_F11 0 x7a
# define VK_F12 0 x7b
# define VK_F13 0 x7c
# define VK_F14 0 x7d
# define VK_F15 0 x7e
# define VK_F16 0 x7f
# define VK_F17 0 x80
# define VK_F18 0 x81
# define VK_F19 0 x82
# define VK_F20 0 x83
# define VK_F21 0 x84
# define VK_F22 0 x85
# define VK_F23 0 x86
# define VK_F24 0 x87
# define VK_NUMLOCK 0 x90
# define VK_SCROLL 0 x91
/*
* VK_L * & amp; VK_R * - left and right Alt, Ctrl + Shift + virtual keys.
* 2 only as parameters to GetAsyncKeyState () and GetKeyState ().
* No other API or message will distinguish the left and right keys in this way.
*/
# define VK_LSHIFT 0 xa0
# define VK_RSHIFT 0 xa1
# define VK_LCONTROL 0 xa2
# define VK_RCONTROL 0 xa3
# define VK_LMENU 0 xa4
# define VK_RMENU 0 xa5
# if (WINVER & gt;=0 x0400)
# define VK_PROCESSKEY 0 xe5
# endif/* WINVER & gt;=0 x0400 */
# define VK_ATTN 0 xf6
# define VK_CRSEL 0 xf7
# define VK_EXSEL 0 xf8
# define VK_EREOF 0 xf9
# define VK_PLAY 0 xfa
# define VK_ZOOM 0 XFB
# define VK_NONAME 0 XFC
# define VK_PA1 0 XFD
nullnullnull