From f9d0e948cb5240a5a1c55dca0f74b881878961f0 Mon Sep 17 00:00:00 2001 From: "Tim E. Real" Date: Sun, 2 Jan 2011 08:46:32 +0000 Subject: Added meta modifiers (the Win key) --- muse2/muse/widgets/shortcutcapturedialog.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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: -- cgit v1.2.3