mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-07-18 06:06:06 -04:00
fix: Switch to Windows 11 keymap when running Windows 11. Closes #494
This commit is contained in:
@@ -846,7 +846,14 @@ class Controller(object):
|
||||
|
||||
def register_invisible_keyboard_shorcuts(self, keymap):
|
||||
if config.changed_keymap:
|
||||
commonMessageDialogs.changed_keymap()
|
||||
build_number = sys.getwindowsversion().build
|
||||
if build_number > 22000:
|
||||
system = "Windows 11"
|
||||
keystroke_editor_shortcut = "Control+Win+Alt+K"
|
||||
else:
|
||||
system = "Windows 10"
|
||||
keystroke_editor_shortcut = "Win+Alt+K"
|
||||
commonMessageDialogs.changed_keymap(system, keystroke_editor_shortcut)
|
||||
# Make sure we pass a keymap without undefined keystrokes.
|
||||
new_keymap = {key: keymap[key] for key in keymap.keys() if keymap[key] != ""}
|
||||
self.keyboard_handler = WXKeyboardHandler(self.view)
|
||||
|
Reference in New Issue
Block a user