sigoden / window-switcher

Easily switch between windows of the same app with Alt+` (Backtick), also switch between apps with Alt+Tab.
MIT License
559 stars 22 forks source link

feat: support `VK_OEM_*` keybinding #87

Closed sigoden closed 7 months ago

sigoden commented 7 months ago

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,