Added keystrokes: control and up/down to turn volume
This commit is contained in:
parent
00a1560b60
commit
f94dca48ff
@ -67,9 +67,13 @@ class Controller(object):
|
|||||||
|
|
||||||
def on_keypress(self, ev):
|
def on_keypress(self, ev):
|
||||||
if ev.GetKeyCode() == wx.WXK_RETURN:
|
if ev.GetKeyCode() == wx.WXK_RETURN:
|
||||||
self.on_play()
|
return self.on_play()
|
||||||
elif ev.GetKeyCode() == wx.WXK_SPACE:
|
elif ev.GetKeyCode() == wx.WXK_SPACE:
|
||||||
self.on_play_pause()
|
return self.on_play_pause()
|
||||||
|
elif ev.GetKeyCode() == wx.WXK_UP and ev.ControlDown():
|
||||||
|
return self.on_volume_up()
|
||||||
|
elif ev.GetKeyCode() == wx.WXK_DOWN and ev.ControlDown():
|
||||||
|
return self.on_volume_down()
|
||||||
ev.Skip()
|
ev.Skip()
|
||||||
|
|
||||||
def on_play_pause(self, *args, **kwargs):
|
def on_play_pause(self, *args, **kwargs):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user