Skip to content

Commit

Permalink
#567: don't immediately unpress modifier keys when in no-keyboard-syn…
Browse files Browse the repository at this point in the history
…c mode, rely on "make_keymask_match" to do its job instead

git-svn-id: https://xpra.org/svn/Xpra/trunk@6472 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed May 15, 2014
1 parent 54f9173 commit 5ee769d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/xpra/server/server_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1382,20 +1382,20 @@ def _handle_key(self, wid, pressed, name, keyval, keycode, modifiers):
del self.keys_timedout[keycode]
def press():
keylog("handle keycode pressing %s: key %s", keycode, name)
if self.keyboard_sync:
self.keys_pressed[keycode] = name
self.keys_pressed[keycode] = name
self.fake_key(keycode, True)
def unpress():
keylog("handle keycode unpressing %s: key %s", keycode, name)
if self.keyboard_sync:
if keycode in self.keys_pressed:
del self.keys_pressed[keycode]
self.fake_key(keycode, False)
if pressed:
if keycode not in self.keys_pressed:
press()
if not self.keyboard_sync:
if not self.keyboard_sync and not self.keyboard_config.is_modifier(keycode):
#keyboard is not synced: client manages repeat so unpress
#it immediately
#it immediately unless this is a modifier key
#(as modifiers are synced via many packets: key, focus and mouse events)
unpress()
else:
keylog("handle keycode %s: key %s was already pressed, ignoring", keycode, name)
Expand Down

0 comments on commit 5ee769d

Please sign in to comment.