From f94dca48ff012abd71c921e489d7f47b0c499c99 Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Fri, 26 Jan 2018 12:08:21 -0600 Subject: [PATCH] Added keystrokes: control and up/down to turn volume --- src/controller/mainController.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/controller/mainController.py b/src/controller/mainController.py index b8784a2..985759f 100644 --- a/src/controller/mainController.py +++ b/src/controller/mainController.py @@ -67,9 +67,13 @@ class Controller(object): def on_keypress(self, ev): if ev.GetKeyCode() == wx.WXK_RETURN: - self.on_play() + return self.on_play() 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() def on_play_pause(self, *args, **kwargs):