Attachment 'keyevents.py'

Download

   1 #!/usr/bin/python
   2 
   3 import pyatspi
   4 
   5 def onKeyPressOrRelease(event):
   6     print "onKeyPressOrRelease: %s" % event
   7 
   8 pyatspi.Registry.registerKeystrokeListener(
   9     onKeyPressOrRelease,
  10     kind=(pyatspi.KEY_PRESSED_EVENT, pyatspi.KEY_RELEASED_EVENT))
  11 pyatspi.Registry.start()
  12 
  13 pyatspi.Registry.deregisterKeystrokeListener(
  14     onKeyPressOrRelease,
  15     kind=(pyatspi.KEY_PRESSED_EVENT, pyatspi.KEY_RELEASED_EVENT))
  16 pyatspi.Registry.stop()

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2021-02-25 09:42:08, 972.1 KB) [[attachment:A11yBugTriaging.pdf]]
  • [get | view] (2021-02-25 09:42:08, 158.7 KB) [[attachment:OrcaBugTriaging.pdf]]
  • [get | view] (2021-02-25 09:42:08, 0.2 KB) [[attachment:helloworld1.py]]
  • [get | view] (2021-02-25 09:42:08, 0.3 KB) [[attachment:helloworld2.py]]
  • [get | view] (2021-02-25 09:42:08, 0.4 KB) [[attachment:keyevents.py]]
  • [get | view] (2021-02-25 09:42:08, 17.8 KB) [[attachment:logo.png]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.