- edited description
Odd behavior with on_key_press
Sometimes when pressing more buttons at the same time, some of them aren't registered before others are released, and sometimes they aren't registered at all.
Broken combinations: Left, up, down A, S, D, F, G
Script used for testing:
import pyglet window = pyglet.window.Window() @window.event() def on_key_press(symbol, modifier): print("Key pressed:", pyglet.window.key.symbol_string(symbol)) @window.event() def on_key_release(symbol, modifier): print("Key released:", pyglet.window.key.symbol_string(symbol)) pyglet.app.run()
python -m pyglet.info: https://docs.google.com/document/d/1dnG1qbC0icSVeuAOPbTatRyFEiyTfQ1e9jTRgnIWlcI/edit?usp=sharing
Comments (5)
-
-
Not a pyglet developer, but this defect normally comes from limitations in the keyboard hardware.
This is a direct consequence of how the electrical matrix of switches is wired, which depends in the manufacturer and model.
Typically it is safe to assume that three simultaneous keys presses will be correctly handled; high end keyboards can handle much more.
-
As Claudio said, this is very likely a hardware limitation. You can read more about that here: https://en.wikipedia.org/wiki/Rollover_(key)
-
- changed status to resolved
Did some checking seems it is, like mentioned, a hardware limitation. Sorry if I wasted anybody's time
-
- changed version to 1.3.x bugfix
- Log in to comment