Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Edit/MainWindow.py30
-rw-r--r--activity/activity.info2
2 files changed, 28 insertions, 4 deletions
diff --git a/Edit/MainWindow.py b/Edit/MainWindow.py
index d27d181..ab7bd42 100644
--- a/Edit/MainWindow.py
+++ b/Edit/MainWindow.py
@@ -325,10 +325,10 @@ class MainWindow( SubActivity ):
self.GUI["2noteVolumeBox"] = gtk.VBox()
self.GUI["2noteVolumeBox"].set_size_request( 72, -1 )
self.GUI["2noteVolumePlusButton"] = ImageButton( Config.IMAGE_ROOT+"editAmpTop.png", Config.IMAGE_ROOT+"editAmpDownTop.png", Config.IMAGE_ROOT+"editAmpOverTop.png", backgroundFill = Config.BG_COLOR )
- self.GUI["2noteVolumePlusButton"].connect( "clicked", lambda a1:self.trackInterface.noteStepVolume(0.05) )
+ self.GUI["2noteVolumePlusButton"].connect( "clicked", lambda a1:self.trackInterface.noteStepVolume(0.1) )
self.GUI["2noteVolumeBox"].pack_start( self.GUI["2noteVolumePlusButton"] )
self.GUI["2noteVolumeMinusButton"] = ImageButton( Config.IMAGE_ROOT+"editAmpBot.png", Config.IMAGE_ROOT+"editAmpDownBot.png", Config.IMAGE_ROOT+"editAmpOverBot.png", backgroundFill = Config.BG_COLOR )
- self.GUI["2noteVolumeMinusButton"].connect( "clicked", lambda a1:self.trackInterface.noteStepVolume(-0.05) )
+ self.GUI["2noteVolumeMinusButton"].connect( "clicked", lambda a1:self.trackInterface.noteStepVolume(-0.1) )
self.GUI["2noteVolumeBox"].pack_start( self.GUI["2noteVolumeMinusButton"] )
self.GUI["2noteBox"].pack_start( self.GUI["2noteVolumeBox"] )
self.GUI["2contextBox"].put( self.GUI["2noteBox"], 25, 0 )
@@ -1247,8 +1247,32 @@ class MainWindow( SubActivity ):
#-----------------------------------
# callback functions
#-----------------------------------
+ def handleKeyboardShortcuts(self,event):
+ key = event.hardware_keycode
+ # backspace and del keys
+ print key
+ if key == 22 or key == 107:
+ self.noteDelete()
+ self.trackDelete()
+
+ if event.state == gtk.gdk.SHIFT_MASK:
+ # up/down arrows volume
+ if key == 98: self.trackInterface.noteStepVolume(0.1)
+ if key == 104: self.trackInterface.noteStepVolume(-0.1)
+ # left/right arrows onset
+ if key == 100: self.trackInterface.noteStepDuration(-1)
+ if key == 102: self.trackInterface.noteStepDuration(1)
+ else:
+ # up/down arrows pitch
+ if key == 98: self.trackInterface.noteStepPitch(1)
+ if key == 104: self.trackInterface.noteStepPitch(-1)
+ # left/right arrows duration
+ if key == 100: self.trackInterface.noteStepOnset(-1)
+ if key == 102: self.trackInterface.noteStepOnset(1)
+
+
def onKeyPress(self,widget,event):
-
+ self.handleKeyboardShortcuts(event)
Config.ModKeys.keyPress( event.hardware_keycode )
key = event.hardware_keycode
diff --git a/activity/activity.info b/activity/activity.info
index d9e5da1..743aab2 100644
--- a/activity/activity.info
+++ b/activity/activity.info
@@ -3,4 +3,4 @@ name = TamTam
service_name = org.laptop.TamTam
icon = activity-tamtam
class = TamTam.TamTam
-activity_version = 21
+activity_version = 22