Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support VK_OEM_* keybinding #87

Merged
merged 2 commits into from
Feb 2, 2024
Merged

feat: support VK_OEM_* keybinding #87

merged 2 commits into from
Feb 2, 2024

Conversation

sigoden
Copy link
Owner

@sigoden sigoden commented Feb 2, 2024

Steps to find non-English keyboard hotkeys:

  1. go to http://kbdlayout.info/shortcut, select Keyboard layout and keys
    image

  2. map to keycode, the following are the avaiable keycodes

            "backspace" => 0x08,
            "tab" => 0x09,
            "clear" => 0x0c,
            "enter" => 0x0d,
            "pause" => 0x13,
            "capslock" => 0x14,
            "escape" => 0x1b,
            "space" => 0x20,
            "pageup" => 0x21,
            "pagedown" => 0x22,
            "end" => 0x23,
            "home" => 0x24,
            "left" => 0x25,
            "up" => 0x26,
            "right" => 0x27,
            "down" => 0x28,
            "select" => 0x29,
            "print" => 0x2a,
            "printscreen" => 0x2c,
            "insert" => 0x2d,
            "delete" => 0x2e,

            "0" => 0x30,
            "1" => 0x31,
            "2" => 0x32,
            "3" => 0x33,
            "4" => 0x34,
            "5" => 0x35,
            "6" => 0x36,
            "7" => 0x37,
            "8" => 0x38,
            "9" => 0x39,
            "a" => 0x41,
            "b" => 0x42,
            "c" => 0x43,
            "d" => 0x44,
            "e" => 0x45,
            "f" => 0x46,
            "g" => 0x47,
            "h" => 0x48,
            "i" => 0x49,
            "j" => 0x4a,
            "k" => 0x4b,
            "l" => 0x4c,
            "m" => 0x4d,
            "n" => 0x4e,
            "o" => 0x4f,
            "p" => 0x50,
            "q" => 0x51,
            "r" => 0x52,
            "s" => 0x53,
            "t" => 0x54,
            "u" => 0x55,
            "v" => 0x56,
            "w" => 0x57,
            "x" => 0x58,
            "y" => 0x59,
            "z" => 0x5a,

            "f1" => 0x70,
            "f2" => 0x71,
            "f3" => 0x72,
            "f4" => 0x73,
            "f5" => 0x74,
            "f6" => 0x75,
            "f7" => 0x76,
            "f8" => 0x77,
            "f9" => 0x78,
            "f10" => 0x79,
            "f11" => 0x7a,
            "f12" => 0x7b,
            "numlock" => 0x90,
            "scrolllock" => 0x91,

            ":" | ";" | "vk_oem_1" => 0xba,
            "+" | "=" | "vk_oem_plus" => 0xbb,
            "<" | "," | "vk_oem_comma" => 0xbc,
            "-" | "_" | "vk_oem_minus" => 0xbd,
            ">" | "." | "vk_oem_period" => 0xbe,
            "?" | "/" | "vk_oem_2" => 0xbf,
            "~" | "`" | "vk_oem_3" => 0xc0,
            "{" | "[" | "vk_oem_4" => 0xdb,
            "|" | "\\" | "vk_oem_5" => 0xdc,
            "}" | "]" | "vk_oem_6" => 0xdd,
            "\"" | "'" | "vk_oem_7" => 0xde,
            "§" | "!" | "vk_oem_8" => 0xdf,

@sigoden sigoden merged commit aa80550 into main Feb 2, 2024
2 checks passed
@sigoden sigoden deleted the feat-hotkey branch February 2, 2024 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant