Advertisement
joanmarie

Crash gnome-shell by typing a space in overview

Dec 28th, 2011
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.64 KB | None | 0 0
  1. #!/usr/bin/python
  2.  
  3. import speechd
  4. from pyatspi import Registry
  5.  
  6. class Echo(object):
  7.  
  8.     def __init__(self, name, component):
  9.         self._client = speechd.SSIPClient(name=name, component=component)
  10.         self._client.set_priority(speechd.Priority.MESSAGE)
  11.  
  12.         Registry.registerKeystrokeListener(self.onKey, mask=range(0,256))
  13.         Registry.registerEventListener(self.onShowing, "object:state-changed:showing")
  14.  
  15.     def onShowing(self, event):
  16.         pass
  17.  
  18.     def onKey(self, event):
  19.         print "onKey: <%s>" % event.event_string
  20.         self._client.key(event.event_string)
  21.  
  22. drone = Echo('Drone', None)
  23. Registry.start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement