Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNat <Nat@localhost.localdomain>2007-02-02 02:07:04 (GMT)
committer Nat <Nat@localhost.localdomain>2007-02-02 02:07:04 (GMT)
commit5b4df75fbac9794d85e56a03c51ebb95ef0e7e37 (patch)
treebb4f35392f2f6768fd11e2afd8e30b7c3b73659e
parent7ef8344d8331781d3a7a3f516e3a33aaa389276b (diff)
Space bar play pause (needs work)
-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))