After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 666871 - registerKeystrokeListener() and deregisterKeystrokeListener() should accept the same argument types
registerKeystrokeListener() and deregisterKeystrokeListener() should accept t...
Status: RESOLVED FIXED
Product: at-spi
Classification: Platform
Component: at-spi2-core
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Li Yuan
Depends on:
Blocks:
 
 
Reported: 2011-12-26 17:51 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2011-12-27 23:16 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Joanmarie Diggs (IRC: joanie) 2011-12-26 17:51:32 UTC
You can register and de-register event listeners using the same argument types.... I would have thought you could do the same with keystroke listeners. See sample and traceback below if you thought so as well. ;)

~~~~~~~~~~~~~~~~

import pyatspi

def onKey(event):
    print "onKey: %s" % event

masks = range(0,256)
pyatspi.Registry.registerKeystrokeListener(onKey, mask=masks)
pyatspi.Registry.deregisterKeystrokeListener(onKey, mask=masks)
pyatspi.Registry.start()

~~~~~~~~~~~~~~~~

Traceback (most recent call last):
  • File "./keystrokes.py", line 10 in <module>
    pyatspi.Registry.deregisterKeystrokeListener(onKey, mask=masks)
  • File "/usr/lib/python2.7/site-packages/pyatspi/registry.py", line 357 in deregisterKeystrokeListener
    Atspi.deregister_keystroke_listener (listener, key_set, mask, kind)
  • File "/usr/lib64/python2.7/site-packages/gi/types.py", line 43 in function
    return info.invoke(*args, **kwargs)
TypeError: Must be number, not list

Comment 1 Mike Gorse 2011-12-27 23:16:33 UTC
Fixed in pyatspi head: 8d4ff5