Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TamTam.py
diff options
context:
space:
mode:
authorNat <natcl@hotmail.com>2007-08-01 05:03:31 (GMT)
committer Nat <natcl@hotmail.com>2007-08-01 05:03:31 (GMT)
commitbafdd13ebf5c271211493e04596ec3eee41c91bd (patch)
treef6311e92f5d038f5d39a6b7b1a223161540e9bbf /TamTam.py
parentdc42845ec154dcbe5347f237ad0b6049068b2932 (diff)
Cleanup of keyb shortcuts alt-t to show toolbar, w,j,m,s to start activities
Diffstat (limited to 'TamTam.py')
-rwxr-xr-xTamTam.py26
1 files changed, 12 insertions, 14 deletions
diff --git a/TamTam.py b/TamTam.py
index 6c90fa6..beacce6 100755
--- a/TamTam.py
+++ b/TamTam.py
@@ -190,26 +190,24 @@ class TamTam(Activity):
def onKeyPress(self, widget, event):
if Config.DEBUG > 5: print 'DEBUG: TamTam::onKeyPress in TamTam.py'
if event.state == gtk.gdk.MOD1_MASK:
- key = event.hardware_keycode
- if key == 54: # j
+ key = event.keyval
+ if key == gtk.keysyms.j:
self.set_mode("jam")
return
- elif key == 58: #m
+ elif key == gtk.keysyms.m:
self.set_mode('mini')
return
- elif key == 49:#39: s
- #self.set_mode('synth')
- #self.keyboardWindow.hide_all()
- #l = os.spawnlp(os.P_NOWAIT,'/usr/share/activities/TamTam.activity/cnee','/usr/share/activities/TamTam.activity/cnee', '--record', '--keyboard', '--mouse', '--stop-key', 'h', '--out-file', '/home/olpc/test.xnl')
+ elif key == gtk.keysyms.s:
+ self.set_mode('synth')
return
- elif key == 25: #w
- self.toolbox.show()
- #self.set_mode('welcome')
- #self.keyboardWindow.show_all()
- #l = os.spawnlp(os.P_NOWAIT,'/usr/share/activities/TamTam.activity/cnee','/usr/share/activities/TamTam.activity/cnee', '--replay', '--keyboard', '--mouse', '--file', '/home/olpc/test.xnl')
+ elif key == gtk.keysyms.w:
+ self.set_mode('welcome')
+ return
+ elif key == gtk.keysyms.e:
+ self.set_mode('edit')
return
- elif key == 53: #x
- self.destroy()
+ elif key == gtk.keysyms.t:
+ self.toolbox.show()
return
if self.mode:
self.modeList[ self.mode ].onKeyPress(widget, event)