GNOME Bugzilla – Bug 666870
Keystroke listeners only work if there is also an event listener
Last modified: 2012-01-05 21:03:44 UTC
import pyatspi def onObject(event): pass def onKey(event): print "onKey: %s" % event masks = range(0,256) pyatspi.Registry.registerKeystrokeListener(onKey, mask=masks) #If you comment out the next line, keystrokes will no longer be printed pyatspi.Registry.registerEventListener(onObject, 'object:') pyatspi.Registry.start()
Looks like a side-effect of the "don't do anything if nothing is listening" change; we're incorrectly deregistering the keystroke listener when there are no event listeners, assuming that "nothing is listening." Right now, atk-bridge doesn't know if any key listeners are listening, and I don't think that we want to have the listener always be on, so we need to have at-spi2-registryd communicate when there are listeners active.
Should be fixed with latest at-spi2-core and at-spi2-atk.