diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Player/StandalonePlayer.py | 8 |
2 files changed, 9 insertions, 0 deletions
@@ -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)) |