summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim E. Real <termtech@rogers.com>2011-01-02 08:46:32 +0000
committerTim E. Real <termtech@rogers.com>2011-01-02 08:46:32 +0000
commitf9d0e948cb5240a5a1c55dca0f74b881878961f0 (patch)
treea3a6fa4be6fe64ebbcdc6cae0d50de29fe3e7796
parent2b6b35d94ace955c3a2d468ee761fa3afe59d5d9 (diff)
Added meta modifiers (the Win key)
-rw-r--r--muse2/muse/widgets/shortcutcapturedialog.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/muse2/muse/widgets/shortcutcapturedialog.cpp b/muse2/muse/widgets/shortcutcapturedialog.cpp
index 0b2b66d2..ca627661 100644
--- a/muse2/muse/widgets/shortcutcapturedialog.cpp
+++ b/muse2/muse/widgets/shortcutcapturedialog.cpp
@@ -38,13 +38,14 @@ ShortcutCaptureDialog::~ShortcutCaptureDialog()
void ShortcutCaptureDialog::keyPressEvent(QKeyEvent* e)
{
- bool shift, alt, ctrl, conflict = false, realkey = false;
+ bool shift, alt, ctrl, meta, conflict = false, realkey = false;
QString msgString = "";
int temp_key;
Qt::KeyboardModifiers mods = ((QInputEvent*)e)->modifiers();
shift = mods & Qt::ShiftModifier;
ctrl = mods & Qt::ControlModifier;
alt = mods & Qt::AltModifier;
+ meta = mods & Qt::MetaModifier;
//printf("Key total: %d, alt: %d, ctrl: %d shift: %d\n",e->key(), alt, ctrl, shift);
temp_key = e->key();
@@ -57,6 +58,7 @@ void ShortcutCaptureDialog::keyPressEvent(QKeyEvent* e)
temp_key += (shift ? (int)Qt::SHIFT : 0); // (int) Tim
temp_key += (ctrl ? (int)Qt::CTRL : 0); //
temp_key += (alt ? (int)Qt::ALT : 0); //
+ temp_key += (meta ? (int)Qt::META : 0);
//printf("Final key assembled: %d\n",temp_key);
// Check if this is a "real" key that completes a valid shortcut: