diff --git a/src/ChangeLog b/src/ChangeLog index 2d595aed44..cf344a934f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2006-01-18 Jean-Marc Lasgouttes + + * kbmap.C (defkey): + * lyxfunc.C (processKeySym): make sure new FuncRequest objects + have origin set to KEYBOARD. (bug 2221) + 2006-01-16 Jürgen Spitzmüller * rowpainter.C (isCursorOnRow): do not exclude endpos(). diff --git a/src/kbmap.C b/src/kbmap.C index 32fbdfd1c4..d2492e7309 100644 --- a/src/kbmap.C +++ b/src/kbmap.C @@ -274,6 +274,7 @@ void kb_keymap::defkey(kb_sequence * seq, newone->mod = seq->modifiers[r]; if (r + 1 == seq->length()) { newone->func = func; + newone->func.origin = FuncRequest::KEYBOARD; newone->table.reset(); return; } else { diff --git a/src/lyxfunc.C b/src/lyxfunc.C index b204a70900..7a7882d85f 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -307,7 +307,8 @@ void LyXFunc::processKeySym(LyXKeySymPtr keysym, key_modifier::state state) // by a binding if (keysym->isText() && keyseq.length() == 1) { lyxerr[Debug::KEY] << "isText() is true, inserting." << endl; - func = FuncRequest(LFUN_SELFINSERT); + func = FuncRequest(LFUN_SELFINSERT, + FuncRequest::KEYBOARD); } else { lyxerr[Debug::KEY] << "Unknown, !isText() - giving up" << endl; owner->message(_("Unknown function.")); @@ -318,7 +319,8 @@ void LyXFunc::processKeySym(LyXKeySymPtr keysym, key_modifier::state state) if (func.action == LFUN_SELFINSERT) { if (encoded_last_key != 0) { string const arg(1, encoded_last_key); - dispatch(FuncRequest(LFUN_SELFINSERT, arg)); + dispatch(FuncRequest(LFUN_SELFINSERT, arg, + FuncRequest::KEYBOARD)); lyxerr[Debug::KEY] << "SelfInsert arg[`" << arg << "']" << endl; }