fix: Switch to Windows 11 keymap when running Windows 11. Closes #494

This commit is contained in:
2024-05-16 10:52:11 -06:00
parent a5cd118b99
commit fd1a64c7b8
4 changed files with 17 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
# -*- coding: cp1252 -*-
import os
import sys
import config_utils
import paths
import logging
@@ -21,7 +22,10 @@ def setup ():
log.debug("Loading keymap...")
global keymap
if float(platform.version()[:2]) >= 10 and app["app-settings"]["load_keymap"] == "default.keymap":
app["app-settings"]["load_keymap"] = "Windows 10.keymap"
if sys.getwindowsversion().build > 22000:
app["app-settings"]["load_keymap"] = "Windows11.keymap"
else:
app["app-settings"]["load_keymap"] = "Windows 10.keymap"
app.write()
global changed_keymap
changed_keymap = True