Skip to content

Commit

Permalink
ignore 'mod2' aka 'Num_Lock' with Wayland clients
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed May 3, 2023
1 parent 3eae460 commit 466e606
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xpra/client/keyboard_helper.py
Expand Up @@ -134,7 +134,7 @@ def _check_shortcut(self, window, key_name, modifiers, depressed, shortcut):
extra_modifiers.remove(rm)
except ValueError:
pass #same modifier listed twice?
kmod = self.keyboard.get_keymap_modifiers()[0]
kmod, _, ignored = self.keyboard.get_keymap_modifiers()
if not kmod and self.keyboard.modifier_keys:
#fallback to server supplied map:
kmod = self.keyboard.modifier_keys
Expand All @@ -145,6 +145,9 @@ def _check_shortcut(self, window, key_name, modifiers, depressed, shortcut):
mod = kmod.get(x)
if mod in extra_modifiers:
extra_modifiers.remove(mod)
for mod in ignored:
if mod in extra_modifiers:
extra_modifiers.remove(mod)
if extra_modifiers:
log("skipping partial shortcut match %s, modifiers unmatched: %s", shortcut, extra_modifiers)
return False
Expand Down
1 change: 1 addition & 0 deletions xpra/platform/xposix/keyboard.py
Expand Up @@ -47,6 +47,7 @@ def do_get_keymap_modifiers(self):
log.warn(" expect keyboard mapping problems")
if is_Wayland():
log.warn(" (incomplete wayland support)")
return {}, [], ["mod2", ]
return {}, [], []
try:
with xsync:
Expand Down

0 comments on commit 466e606

Please sign in to comment.