Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Player/StandalonePlayer.py8
2 files changed, 9 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 39e2fa8..d024028 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
*pyc
*~
+*.kpf
diff --git a/Player/StandalonePlayer.py b/Player/StandalonePlayer.py
index aaf3e35..4957b2a 100644
--- a/Player/StandalonePlayer.py
+++ b/Player/StandalonePlayer.py
@@ -65,6 +65,7 @@ class StandAlonePlayer( gtk.EventBox ):
self.add(self.mainWindowBox)
self.enableKeyboard()
+ self.connect('key-press-event',self.handleKeyboard)
self.setInstrument(self.instrument)
self.drawInstrumentButtons()
@@ -439,6 +440,13 @@ class StandAlonePlayer( gtk.EventBox ):
instrumentFlag = instrument,
reverbSend = 0)
note.playNow(secs_per_tick)
+
+ def handleKeyboard(self, widget, event):
+ if event.hardware_keycode == 65:
+ if self.playStopButton.get_active():
+ self.playStopButton.set_active(False)
+ else:
+ self.playStopButton.set_active(True)
def playStartupSound(self):
r = str(random.randrange(1,11))