73 lines
2.5 KiB
Rust
73 lines
2.5 KiB
Rust
|
// https://stackoverflow.com/questions/3202629/where-can-i-find-a-list-of-mac-virtual-key-codes
|
||
|
|
||
|
/* keycodes for keys that are independent of keyboard layout */
|
||
|
|
||
|
#![allow(non_upper_case_globals)]
|
||
|
#![allow(dead_code)]
|
||
|
|
||
|
pub const kVK_Return: u16 = 0x24;
|
||
|
pub const kVK_Tab: u16 = 0x30;
|
||
|
pub const kVK_Space: u16 = 0x31;
|
||
|
pub const kVK_Delete: u16 = 0x33;
|
||
|
pub const kVK_Escape: u16 = 0x35;
|
||
|
pub const kVK_Command: u16 = 0x37;
|
||
|
pub const kVK_Shift: u16 = 0x38;
|
||
|
pub const kVK_CapsLock: u16 = 0x39;
|
||
|
pub const kVK_Option: u16 = 0x3A;
|
||
|
pub const kVK_Control: u16 = 0x3B;
|
||
|
pub const kVK_RightShift: u16 = 0x3C;
|
||
|
pub const kVK_RightOption: u16 = 0x3D;
|
||
|
pub const kVK_RightControl: u16 = 0x3E;
|
||
|
pub const kVK_Function: u16 = 0x3F;
|
||
|
pub const kVK_F17: u16 = 0x40;
|
||
|
pub const kVK_VolumeUp: u16 = 0x48;
|
||
|
pub const kVK_VolumeDown: u16 = 0x49;
|
||
|
pub const kVK_Mute: u16 = 0x4A;
|
||
|
pub const kVK_F18: u16 = 0x4F;
|
||
|
pub const kVK_F19: u16 = 0x50;
|
||
|
pub const kVK_F20: u16 = 0x5A;
|
||
|
pub const kVK_F5: u16 = 0x60;
|
||
|
pub const kVK_F6: u16 = 0x61;
|
||
|
pub const kVK_F7: u16 = 0x62;
|
||
|
pub const kVK_F3: u16 = 0x63;
|
||
|
pub const kVK_F8: u16 = 0x64;
|
||
|
pub const kVK_F9: u16 = 0x65;
|
||
|
pub const kVK_F11: u16 = 0x67;
|
||
|
pub const kVK_F13: u16 = 0x69;
|
||
|
pub const kVK_F16: u16 = 0x6A;
|
||
|
pub const kVK_F14: u16 = 0x6B;
|
||
|
pub const kVK_F10: u16 = 0x6D;
|
||
|
pub const kVK_F12: u16 = 0x6F;
|
||
|
pub const kVK_F15: u16 = 0x71;
|
||
|
pub const kVK_Help: u16 = 0x72;
|
||
|
pub const kVK_Home: u16 = 0x73;
|
||
|
pub const kVK_PageUp: u16 = 0x74;
|
||
|
pub const kVK_ForwardDelete: u16 = 0x75;
|
||
|
pub const kVK_F4: u16 = 0x76;
|
||
|
pub const kVK_End: u16 = 0x77;
|
||
|
pub const kVK_F2: u16 = 0x78;
|
||
|
pub const kVK_PageDown: u16 = 0x79;
|
||
|
pub const kVK_F1: u16 = 0x7A;
|
||
|
pub const kVK_LeftArrow: u16 = 0x7B;
|
||
|
pub const kVK_RightArrow: u16 = 0x7C;
|
||
|
pub const kVK_DownArrow: u16 = 0x7D;
|
||
|
pub const kVK_UpArrow: u16 = 0x7E;
|
||
|
pub const kVK_ANSI_Keypad0: u16 = 0x52;
|
||
|
pub const kVK_ANSI_Keypad1: u16 = 0x53;
|
||
|
pub const kVK_ANSI_Keypad2: u16 = 0x54;
|
||
|
pub const kVK_ANSI_Keypad3: u16 = 0x55;
|
||
|
pub const kVK_ANSI_Keypad4: u16 = 0x56;
|
||
|
pub const kVK_ANSI_Keypad5: u16 = 0x57;
|
||
|
pub const kVK_ANSI_Keypad6: u16 = 0x58;
|
||
|
pub const kVK_ANSI_Keypad7: u16 = 0x59;
|
||
|
pub const kVK_ANSI_Keypad8: u16 = 0x5B;
|
||
|
pub const kVK_ANSI_Keypad9: u16 = 0x5C;
|
||
|
pub const kVK_ANSI_KeypadClear: u16 = 0x47;
|
||
|
pub const kVK_ANSI_KeypadDecimal: u16 = 0x41;
|
||
|
pub const kVK_ANSI_KeypadMultiply: u16 = 0x43;
|
||
|
pub const kVK_ANSI_KeypadPlus: u16 = 0x45;
|
||
|
pub const kVK_ANSI_KeypadDivide: u16 = 0x4B;
|
||
|
pub const kVK_ANSI_KeypadEnter: u16 = 0x4C;
|
||
|
pub const kVK_ANSI_KeypadMinus: u16 = 0x4E;
|
||
|
pub const kVK_ANSI_KeypadEquals: u16 = 0x51;
|