Graphics/Events: key-release goes to key-press handler

Issue #132 resolved
Doug Blank created an issue

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)

  1. Log in to comment