Hello everyone.
ı write
Keyboard.press(KEY_LEFT_CTRL);
After this ı want to make keypad's 1 button pressed.
I couldn't find what will be written (here)
I tried (KEY_KP1); (KEY_KP_1); (KEY_PAD_1); (KEY_KEYPAD_1); bla bla
But ı dont know what should ı write there to press 1 on keypad.
Thank you for your help.
You can find the list in USBapi.h. The keypad '1' key doubles as the 'END' key.
#define KEY_LEFT_CTRL 0x80
#define KEY_LEFT_SHIFT 0x81
#define KEY_LEFT_ALT 0x82
#define KEY_LEFT_GUI 0x83
#define KEY_RIGHT_CTRL 0x84
#define KEY_RIGHT_SHIFT 0x85
#define KEY_RIGHT_ALT 0x86
#define KEY_RIGHT_GUI 0x87
#define KEY_UP_ARROW 0xDA
#define KEY_DOWN_ARROW 0xD9
#define KEY_LEFT_ARROW 0xD8
#define KEY_RIGHT_ARROW 0xD7
#define KEY_BACKSPACE 0xB2
#define KEY_TAB 0xB3
#define KEY_RETURN 0xB0
#define KEY_ESC 0xB1
#define KEY_INSERT 0xD1
#define KEY_DELETE 0xD4
#define KEY_PAGE_UP 0xD3
#define KEY_PAGE_DOWN 0xD6
#define KEY_HOME 0xD2
#define KEY_END 0xD5
#define KEY_CAPS_LOCK 0xC1
#define KEY_F1 0xC2
#define KEY_F2 0xC3
#define KEY_F3 0xC4
#define KEY_F4 0xC5
#define KEY_F5 0xC6
#define KEY_F6 0xC7
#define KEY_F7 0xC8
#define KEY_F8 0xC9
#define KEY_F9 0xCA
#define KEY_F10 0xCB
#define KEY_F11 0xCC
#define KEY_F12 0xCD
I know this list and ı use. But I dont understand what did you mean. When ı write ('1'); There is no problem but this is different from keypad's 1 on the Falcom Home Cockpit simulation.
I still do not know how can ı press 1 on keypad. Or 2, or 5. Thank you =)
Edit: Yeah ı find ı website that has ascıı value of keypad buttons.
http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00000520.html
Thank you. =)
Here are some keycodes that USBAPI.h does not define.
The 0x88 is due to how HID.cpp handles the codes:
0..127 are looked up from _asciimap[], 128..135 are modifiers, 136..255 = USB Usage ID + 136.
The largest usable Usage ID is therefore 119 = 0x77.
http://www.usb.org/developers/hidpage/Hut1_12v2.pdf
HID Usage Tables
Section 10 Keyboard/Keypad Page
#define KEY_NUM_LOCK (0x88+0x53)
#define KEY_KP_DIVIDE (0x88+0x54)
#define KEY_KP_SLASH (0x88+0x54)
#define KEY_KP_MULTIPLY (0x88+0x55)
#define KEY_KP_ASTERISK (0x88+0x55)
#define KEY_KP_SUBTRACT (0x88+0x56)
#define KEY_KP_MINUS (0x88+0x56)
#define KEY_KP_ADD (0x88+0x57)
#define KEY_KP_PLUS (0x88+0x57)
#define KEY_KP_ENTER (0x88+0x58)
#define KEY_KP_1 (0x88+0x59)
#define KEY_KP_2 (0x88+0x5A)
#define KEY_KP_3 (0x88+0x5B)
#define KEY_KP_4 (0x88+0x5C)
#define KEY_KP_5 (0x88+0x5D)
#define KEY_KP_6 (0x88+0x5E)
#define KEY_KP_7 (0x88+0x5F)
#define KEY_KP_8 (0x88+0x60)
#define KEY_KP_9 (0x88+0x61)
#define KEY_KP_0 (0x88+0x62)
#define KEY_KP_DOT (0x88+0x63)
synack191:
I know this list and ı use. But I dont understand what did you mean.
I mean: Look at the keypad and use the OTHER label. The keypad key that says '1' also says 'END' so use the value KEY_END.