Commits

Andreas Schiefer  committed 5be9417

Fix error on Linux when mixing raw_input() and keyboard event handlers (like in the test suite)

  • Participants
  • Parent commits eb11fed

Comments (0)

Files changed (1)

File pyglet/window/xlib/__init__.py

         elif ev.type == xlib.KeyRelease:
             if symbol:
                 self.dispatch_event('on_key_release', symbol, modifiers)
-                if _can_detect_autorepeat:
+                if _can_detect_autorepeat and symbol in self.pressed_keys:
                     self.pressed_keys.remove(symbol)
 
     @XlibEventHandler(xlib.KeyPress)