Dulcimer/firmware/keycodes.h

258 lines
6.0 KiB
C
Raw Normal View History

2008-07-09 22:47:12 +02:00
/**
* \file firmware/keycodes.h
* \brief This file contains modifier- and keycode definitions according to the
* USB-specifications for human interface devices.
*
* See usb.org's HID-usage-tables document, chapter 10 Keyboard/Keypad Page for
* more codes: http://www.usb.org/developers/devclass_docs/Hut1_12.pdf
* \author Ronald Schaten <ronald@schatenseite.de>
* \version $Id$
2008-07-09 22:47:12 +02:00
*
* License: GNU GPL v2 (see License.txt)
*/
#ifndef __keycodes_h_included__
#define __keycodes_h_included__
/// Codes for modifier-keys.
enum modifiers {
MOD_NONE = 0,
MOD_CONTROL_LEFT = (1 << 0),
MOD_SHIFT_LEFT = (1 << 1),
MOD_ALT_LEFT = (1 << 2),
MOD_GUI_LEFT = (1 << 3),
MOD_CONTROL_RIGHT = (1 << 4),
MOD_SHIFT_RIGHT = (1 << 5),
MOD_ALT_RIGHT = (1 << 6),
MOD_GUI_RIGHT = (1 << 7),
};
/// Codes for non-modifier-keys.
enum keycodes {
KEY_Reserved = 0, // unused
KEY_ErrorRollOver,
KEY_POSTFail,
KEY_ErrorUndefined,
KEY_A, // 0x04
KEY_B,
KEY_C,
KEY_D,
KEY_E,
KEY_F,
KEY_G,
KEY_H,
KEY_I,
KEY_J,
KEY_K,
KEY_L,
KEY_M, // 0x10
KEY_N,
KEY_O,
KEY_P,
KEY_Q,
KEY_R,
KEY_S,
KEY_T,
KEY_U,
KEY_V,
KEY_W,
KEY_X,
KEY_Y,
KEY_Z,
KEY_1, // 1 and !
KEY_2, // 2 and @
KEY_3, // 0x20 3 and #
KEY_4, // 4 and $
KEY_5, // 5 and %
KEY_6, // 6 and ^
KEY_7, // 7 and &
KEY_8, // 8 and *
KEY_9, // 9 and (
KEY_0, // 0x27 0 and )
KEY_Return, // 0x28 enter
KEY_ESCAPE, // 0x29
KEY_DELETE, // 0x2A backspace
KEY_Tab, // 0x2B
KEY_Spacebar, // 0x2C
KEY_minus, // 0x2D - and _
KEY_equals, // 0x2E = and +
KEY_lbracket, // 0x2F [ and {
KEY_rbracket, // 0x30 ] and }
KEY_backslash, // 0x31 \ and |
KEY_hash, // 0x32 non-US # and ~
KEY_semicolon, // 0x33 ; and :
KEY_apostroph, // 0x34 ' and "
KEY_grave, // 0x35 grave accent and tilde
KEY_comma, // 0x36 , and <
KEY_dot, // 0x37 . and >
KEY_slash, // 0x38 / and ?
KEY_capslock, // 0x39
KEY_F1,
KEY_F2,
KEY_F3,
KEY_F4,
KEY_F5,
KEY_F6,
KEY_F7, // 0x40
KEY_F8,
KEY_F9,
KEY_F10,
KEY_F11,
KEY_F12,
KEY_PrintScreen,
KEY_ScrollLock,
KEY_Pause, // Break
KEY_Insert,
KEY_Home,
KEY_PageUp,
KEY_DeleteForward,
KEY_End,
KEY_PageDown,
KEY_RightArrow,
KEY_LeftArrow, // 0x50
KEY_DownArrow,
KEY_UpArrow,
KEY_NumLock, // Clear
KEY_KPslash,
KEY_KPasterisk,
KEY_KPminus,
KEY_KPplus,
KEY_KPenter,
KEY_KP1, // End
KEY_KP2, // Down Arrow
KEY_KP3, // Page Down
KEY_KP4, // Left Arrow
KEY_KP5,
KEY_KP6, // Right Arrow
KEY_KP7, // Home
KEY_KP8, // 0x60 Up Arrow
KEY_KP9, // Page Up
KEY_KP0, // Insert
KEY_KPcomma, // Delete
KEY_Euro, // non-US \ and |
2008-11-15 23:07:15 +01:00
KEY_Application, // windows menu or unix compose
KEY_Power,
KEY_KPequals, // =
KEY_F13,
KEY_F14,
KEY_F15,
KEY_F16,
KEY_F17,
KEY_F18,
KEY_F19,
KEY_F20,
KEY_F21,
KEY_F22,
KEY_F23,
KEY_F24,
KEY_Execute,
KEY_Help,
KEY_Menu,
KEY_Select,
KEY_Stop,
KEY_Again,
KEY_Undo,
KEY_Cut,
KEY_Copy,
KEY_Paste,
KEY_Find,
KEY_Mute,
KEY_Volume_Up,
KEY_Volume_Down,
KEY_Locking_Caps_Lock,
KEY_Locking_Num_Lock,
KEY_Locking_Scroll_Lock,
KEY_KPComma,
KEY_KPEqual_Sign,
KEY_International1,
KEY_International2,
KEY_International3,
KEY_International4,
KEY_International5,
KEY_International6,
KEY_International7,
KEY_International8,
KEY_International9,
KEY_LANG1,
KEY_LANG2,
KEY_LANG3,
KEY_LANG4,
KEY_LANG5,
KEY_LANG6,
KEY_LANG7,
KEY_LANG8,
KEY_LANG9,
KEY_Alternate_Erase,
KEY_SysReq_Attention,
KEY_Cancel,
KEY_Clear,
KEY_Prior,
KEY_Return2,
KEY_Separator,
KEY_Out,
KEY_Oper,
KEY_Clear_Again,
KEY_CrSel_Props,
KEY_ExSel,
Reserved165,
Reserved166,
Reserved167,
Reserved168,
Reserved169,
Reserved170,
Reserved171,
Reserved172,
Reserved173,
Reserved174,
Reserved175,
KEY_KP00,
KEY_KP000,
Thousands_Separator,
Decimal_Separator,
Currency_Unit,
Currency_Subunit,
KEY_KPleftParentheses,
KEY_KPrightParentheses,
KEY_KPleftBraces,
KEY_KPrightBraces,
KEY_KPTab,
KEY_KPBackspace,
KEY_KPA,
KEY_KPB,
KEY_KPC,
KEY_KPD,
KEY_KPE,
KEY_KPF,
KEY_KPXOR,
KEY_KPcircumflex, // ^
KEY_KPpercent, // %
KEY_KPlesser, // <
KEY_KPgreater, // >
KEY_KPand, // &
KEY_KPandand, // &&
KEY_KPor, // |
KEY_KPoror, // ||
KEY_KPcolon, // :
KEY_KPhash, // #
KEY_KPSpace,
KEY_KPat, // @
KEY_KPbang, // !
KEY_KPMemory_Store,
KEY_KPMemory_Recall,
KEY_KPMemory_Clear,
KEY_KPMemory_Add,
KEY_KPMemory_Subtract,
KEY_KPMemory_Multiply,
KEY_KPMemory_Divide,
KEY_KPplusminus, // +/-
KEY_KPClear,
KEY_KPClear_Entry,
KEY_KPBinary,
KEY_KPOctal,
KEY_KPDecimal,
KEY_KPHexadecimal
2008-07-09 22:47:12 +02:00
};
#endif /* __keycodes_h_included__ */