diff --git a/src/frontends/qt4/CustomizedWidgets.cpp b/src/frontends/qt4/CustomizedWidgets.cpp index a3a61bf8b9..d738ea281c 100644 --- a/src/frontends/qt4/CustomizedWidgets.cpp +++ b/src/frontends/qt4/CustomizedWidgets.cpp @@ -141,10 +141,11 @@ void ShortcutWidget::appendToSequence(QKeyEvent * e) { KeySymbol sym; setKeySymbol(&sym, e); - - KeyModifier mod = lyx::q_key_state(e->modifiers()); - keysequence_.addkey(sym, mod, lyx::NoModifier); + if (sym.isOK()) { + KeyModifier mod = lyx::q_key_state(e->modifiers()); + keysequence_.addkey(sym, mod, lyx::NoModifier); + } } diff --git a/src/frontends/qt4/GuiKeySymbol.cpp b/src/frontends/qt4/GuiKeySymbol.cpp index 082a184721..e82066403e 100644 --- a/src/frontends/qt4/GuiKeySymbol.cpp +++ b/src/frontends/qt4/GuiKeySymbol.cpp @@ -638,7 +638,7 @@ void KeySymbol::init(string const & symbolname) bool KeySymbol::isOK() const { - bool const ok = !(text_.empty() && key_ == Qt::Key_unknown); + bool const ok = !(text_.empty() && qkey_to_string(key_).empty()); LYXERR(Debug::KEY, "isOK is " << ok); return ok; } diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp index 76a8858a60..fba2c865db 100644 --- a/src/frontends/qt4/GuiWorkArea.cpp +++ b/src/frontends/qt4/GuiWorkArea.cpp @@ -854,8 +854,12 @@ void GuiWorkArea::keyPressEvent(QKeyEvent * ev) KeySymbol sym; setKeySymbol(&sym, ev); - processKeySym(sym, q_key_state(ev->modifiers())); - ev->accept(); + if (sym.isOK()) { + processKeySym(sym, q_key_state(ev->modifiers())); + ev->accept(); + } else { + ev->ignore(); + } } diff --git a/status.16x b/status.16x index f677303170..de9ecd1ff2 100644 --- a/status.16x +++ b/status.16x @@ -296,6 +296,8 @@ What's new - Re-allow the insertion of glue lengths in the VSpace dialog and the VSkip widget of the Document dialog (bug 6097). +- Fix bug where multimedia keys were intercepted by LyX (bug 6043). + * DOCUMENTATION AND LOCALIZATION