Skip to content

Commit

Permalink
#2632 also use the keysym without trying to tweak the modifiers if it…
Browse files Browse the repository at this point in the history
… is the only keysym for this keycode (no risk of generating the wrong key?)

git-svn-id: https://xpra.org/svn/Xpra/trunk@27455 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Sep 15, 2020
1 parent e4c923e commit 603c734
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/xpra/x11/server_keyboard_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,11 @@ def klog(msg, *args):
keysyms = self.keycode_mappings.get(keycode)
klog("=%i (level=%i, shift=%s, mode=%i, keysyms=%s)", keycode, level, shift, mode, keysyms)
level0 = levels[0]
if len(keysyms)>level0 and keysyms[level0]=="":
uq_keysyms = set(keysyms)
if len(uq_keysyms)<=1 or (len(keysyms)>level0 and keysyms[level0]==""):
#if the keysym we would match for this keycode is 'NoSymbol',
#then we can probably ignore it ('NoSymbol' shows up as "")
#same if there's only one actual keysym for this keycode
kmlog("not toggling any modifiers state for keysyms=%s", keysyms)
break
def toggle_modifier(mod):
Expand Down

0 comments on commit 603c734

Please sign in to comment.