From 031e6d6ab98a02bc07bf840d25ad3b326d4f9851 Mon Sep 17 00:00:00 2001 From: Robert Jonsson Date: Sat, 21 Aug 2010 16:20:00 +0000 Subject: global shortcuts with modifiers --- muse/ChangeLog | 1 + muse/muse/app.cpp | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/muse/ChangeLog b/muse/ChangeLog index e7ee3103..faa0837b 100644 --- a/muse/ChangeLog +++ b/muse/ChangeLog @@ -1,5 +1,6 @@ 21.08.2010 * Renamed: Soft synth configuration changed to Synth configuration, as per patch from Geoff King (rj) + * Fixed: Shortcuts with modifier keys wasn't working for global shortcuts, should be now (rj) 10.08.2010 * Fixed/Changed: Grid reacts to midi resolution change (rj) 01.08.2010 diff --git a/muse/muse/app.cpp b/muse/muse/app.cpp index 17084227..72f6e448 100644 --- a/muse/muse/app.cpp +++ b/muse/muse/app.cpp @@ -2900,6 +2900,7 @@ void MusE::ctrlChanged() void MusE::kbAccel(int key) { + printf("pressed key %d \n",key); if (key == shortcuts[SHRT_TOGGLE_METRO].key) { song->setClick(!song->click()); } @@ -3007,7 +3008,14 @@ class MuseApplication : public QApplication { globalKeyState = ke->stateAfter(); bool accepted = ke->isAccepted(); if (!accepted) { - muse->kbAccel(ke->key()); + int key = ke->key(); + if (ke->state() & ShiftButton) + key += SHIFT; + if (ke->state() & AltButton) + key += ALT; + if (ke->state() & ControlButton) + key+= CTRL; + muse->kbAccel(key); return true; } } -- cgit v1.2.3