diff options
author | Tim E. Real <termtech@rogers.com> | 2011-01-02 08:46:32 +0000 |
---|---|---|
committer | Tim E. Real <termtech@rogers.com> | 2011-01-02 08:46:32 +0000 |
commit | f9d0e948cb5240a5a1c55dca0f74b881878961f0 (patch) | |
tree | a3a6fa4be6fe64ebbcdc6cae0d50de29fe3e7796 /muse2/muse | |
parent | 2b6b35d94ace955c3a2d468ee761fa3afe59d5d9 (diff) |
Added meta modifiers (the Win key)
Diffstat (limited to 'muse2/muse')
-rw-r--r-- | muse2/muse/widgets/shortcutcapturedialog.cpp | 4 |
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: |