Last active
August 29, 2015 14:06
-
-
Save amclain/30be0b7320ec7996e88e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// USB key definitions for Thrustmaster TARGET Script | |
// ----------------------------------------------------------------------------- | |
// The MIT License (MIT) | |
// | |
// Copyright (c) 2014 Alex McLain | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: | |
// | |
// The above copyright notice and this permission notice shall be included in | |
// all copies or substantial portions of the Software. | |
// | |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
// THE SOFTWARE. | |
// ----------------------------------------------------------------------------- | |
define USB_A USB[0x04] | |
define USB_B USB[0x05] | |
define USB_C USB[0x06] | |
define USB_D USB[0x07] | |
define USB_E USB[0x08] | |
define USB_F USB[0x09] | |
define USB_G USB[0x0A] | |
define USB_H USB[0x0B] | |
define USB_I USB[0x0C] | |
define USB_J USB[0x0D] | |
define USB_K USB[0x0E] | |
define USB_L USB[0x0F] | |
define USB_M USB[0x10] | |
define USB_N USB[0x11] | |
define USB_O USB[0x12] | |
define USB_P USB[0x13] | |
define USB_Q USB[0x14] | |
define USB_R USB[0x15] | |
define USB_S USB[0x16] | |
define USB_T USB[0x17] | |
define USB_U USB[0x18] | |
define USB_V USB[0x19] | |
define USB_W USB[0x1A] | |
define USB_X USB[0x1B] | |
define USB_Y USB[0x1C] | |
define USB_Z USB[0x1D] | |
define USB_1 USB[0x1E] | |
define USB_2 USB[0x1F] | |
define USB_3 USB[0x20] | |
define USB_4 USB[0x21] | |
define USB_5 USB[0x22] | |
define USB_6 USB[0x23] | |
define USB_7 USB[0x24] | |
define USB_8 USB[0x25] | |
define USB_9 USB[0x26] | |
define USB_0 USB[0x27] | |
define USB_RETURN USB[0x28] | |
define USB_ESCAPE USB[0x29] | |
define USB_BACKSPACE USB[0x2A] | |
define USB_TAB USB[0x2B] | |
define USB_SPACE USB[0x2C] | |
define USB_DASH USB[0x2D] | |
define USB_EQUALS USB[0x2E] | |
define USB_LEFT_BRACKET USB[0x2F] | |
define USB_RIGHT_BRACKET USB[0x30] | |
define USB_BACKSLASH USB[0x31] | |
define USB_EUROPE_1 USB[0x32] | |
define USB_SEMICOLON USB[0x33] | |
define USB_APOSTROPHE USB[0x34] | |
define USB_TILDE USB[0x35] | |
define USB_COMMA USB[0x36] | |
define USB_PERIOD USB[0x37] | |
define USB_SLASH USB[0x38] | |
define USB_CAPS_LOCK USB[0x39] | |
define USB_F1 USB[0x3A] | |
define USB_F2 USB[0x3B] | |
define USB_F3 USB[0x3C] | |
define USB_F4 USB[0x3D] | |
define USB_F5 USB[0x3E] | |
define USB_F6 USB[0x3F] | |
define USB_F7 USB[0x40] | |
define USB_F8 USB[0x41] | |
define USB_F9 USB[0x42] | |
define USB_F10 USB[0x43] | |
define USB_F11 USB[0x44] | |
define USB_F12 USB[0x45] | |
define USB_PRINT_SCREEN USB[0x46] | |
define USB_SCROLL_LOCK USB[0x47] | |
define USB_BREAK USB[0x48] | |
define USB_PAUSE USB[0x48] | |
define USB_INSERT USB[0x49] | |
define USB_HOME USB[0x4A] | |
define USB_PAGE_UP USB[0x4B] | |
define USB_DELETE USB[0x4C] | |
define USB_END USB[0x4D] | |
define USB_PAGE_DOWN USB[0x4E] | |
define USB_RIGHT_ARROW USB[0x4F] | |
define USB_LEFT_ARROW USB[0x50] | |
define USB_DOWN_ARROW USB[0x51] | |
define USB_UP_ARROW USB[0x52] | |
define USB_NUM_LOCK USB[0x53] | |
define USB_KEYPAD_SLASH USB[0x54] | |
define USB_KEYPAD_STAR USB[0x55] | |
define USB_KEYPAD_MINUS USB[0x56] | |
define USB_KEYPAD_PLUS USB[0x57] | |
define USB_KEYPAD_ENTER USB[0x58] | |
define USB_KEYPAD_1 USB[0x59] | |
define USB_KEYPAD_2 USB[0x5A] | |
define USB_KEYPAD_3 USB[0x5B] | |
define USB_KEYPAD_4 USB[0x5C] | |
define USB_KEYPAD_5 USB[0x5D] | |
define USB_KEYPAD_6 USB[0x5E] | |
define USB_KEYPAD_7 USB[0x5F] | |
define USB_KEYPAD_8 USB[0x60] | |
define USB_KEYPAD_9 USB[0x61] | |
define USB_KEYPAD_0 USB[0x62] | |
define USB_KEYPAD_DOT USB[0x63] | |
define USB_EUROPE_2 USB[0x64] | |
define USB_KEYPAD_EQUALS USB[0x67] | |
define USB_F13 USB[0x68] | |
define USB_F14 USB[0x69] | |
define USB_F15 USB[0x6A] | |
define USB_F16 USB[0x6B] | |
define USB_F17 USB[0x6C] | |
define USB_F18 USB[0x6D] | |
define USB_F19 USB[0x6E] | |
define USB_F20 USB[0x6F] | |
define USB_F21 USB[0x70] | |
define USB_F22 USB[0x71] | |
define USB_F23 USB[0x72] | |
define USB_F24 USB[0x73] | |
// TODO: International keys go here. | |
define USB_LEFT_CONTROL USB[0xE0] | |
define USB_LEFT_SHIFT USB[0xE1] | |
define USB_LEFT_ALT USB[0xE2] | |
define USB_LEFT_SUPER USB[0xE3] | |
define USB_RIGHT_CONTROL USB[0xE4] | |
define USB_RIGHT_SHIFT USB[0xE5] | |
define USB_RIGHT_ALT USB[0xE6] | |
define USB_RIGHT_SUPER USB[0xE7] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment