backport r30389 (bug #6043)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30898 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2009-08-07 13:20:48 +00:00
parent 5ba684315e
commit 0f655bc3eb
4 changed files with 13 additions and 6 deletions

View File

@ -142,9 +142,10 @@ void ShortcutWidget::appendToSequence(QKeyEvent * e)
KeySymbol sym;
setKeySymbol(&sym, e);
if (sym.isOK()) {
KeyModifier mod = lyx::q_key_state(e->modifiers());
keysequence_.addkey(sym, mod, lyx::NoModifier);
}
}

View File

@ -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;
}

View File

@ -854,8 +854,12 @@ void GuiWorkArea::keyPressEvent(QKeyEvent * ev)
KeySymbol sym;
setKeySymbol(&sym, ev);
if (sym.isOK()) {
processKeySym(sym, q_key_state(ev->modifiers()));
ev->accept();
} else {
ev->ignore();
}
}

View File

@ -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