summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Jonsson <spamatica@gmail.com>2010-08-21 16:20:00 +0000
committerRobert Jonsson <spamatica@gmail.com>2010-08-21 16:20:00 +0000
commit031e6d6ab98a02bc07bf840d25ad3b326d4f9851 (patch)
treef5b04608f24e561cd10dd93305f1b6454d4ab5ba
parent2cf44bbada7ab931ff3a5f7f7b97ce712c14f6d7 (diff)
global shortcuts with modifiers
-rw-r--r--muse/ChangeLog1
-rw-r--r--muse/muse/app.cpp10
2 files changed, 10 insertions, 1 deletions
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;
}
}