/[circus]/circus/modules/CircusKeybindings/keybindings.py
ViewVC logotype

Diff of /circus/modules/CircusKeybindings/keybindings.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by tvon, Sat Nov 16 03:55:29 2002 UTC revision 1.5 by tvon, Sat Nov 16 13:43:55 2002 UTC
# Line 23  from circus import module Line 23  from circus import module
23    
24  class MyModule(module.Module):  class MyModule(module.Module):
25    
26      my_events = [X.ButtonPress, X.KeyPress, X.KeyRelease]      my_events = [X.ButtonPress, X.KeyPress, X.KeyRelease, X.MotionNotify]
27    
28      def load(self):      def load(self):
29          pass          pass
30    
31      def handle_event(self,event):      def handle_event(self,event):
32          if event.type == X.ButtonPress:          if event.type == X.ButtonPress:
33              print "Keybinding module received an event of type:", event.type              print "X.ButtonPress"
34              print self.display.get_display_name()  
35            if event.type == X.KeyPress:
36                print "X.Keypress"
37                
38            if event.type == X.MotionNotify:
39                print event.root_x, "x", event.root_y

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26