Graphics/Events: key-release goes to key-press handler
Issue #132
resolved
When using Graphics/Events, hold down a key; when you release the release goes to the key-press event too. Why?
import Graphics
import Events
def releaseFunction(o, e):
print('R! ' + str(e))
def pressFunction(o, e):
print('KeyPress! ' + str(e))
Events.init()
win = Graphics.Window()
s1 = Graphics.Sprite("bear")
s1.drawAt(win, (200, 200))
s1.subscribe("key-release", releaseFunction)
s1.subscribe("key-press", pressFunction)
Comments (3)
-
reporter -
reporter Can't get it to reproduce at all now...
-
reporter - changed status to resolved
Could not replicate.
- Log in to comment
Doesn't always happen... just sometimes. :(