}
+namespace {
+void restartCursor(LyXView * lv)
+{
+ /* When we move around, or type, it's nice to be able to see
+ * the cursor immediately after the keypress.
+ */
+ if (lv && lv->currentWorkArea())
+ lv->currentWorkArea()->startBlinkingCursor();
+}
+}
+
void LyXFunc::processKeySym(KeySymbol const & keysym, KeyModifier state)
{
LYXERR(Debug::KEY) << "KeySym is " << keysym.getSymbolName() << endl;
if (!keysym.isOK()) {
LYXERR(Debug::KEY) << "Empty kbd action (probably composing)"
<< endl;
+ restartCursor(lyx_view_);
return;
}
if (keysym.isModifier()) {
LYXERR(Debug::KEY) << "isModifier true" << endl;
+ restartCursor(lyx_view_);
return;
}
} else {
LYXERR(Debug::KEY) << "Unknown, !isText() - giving up" << endl;
lyx_view_->message(_("Unknown function."));
+ restartCursor(lyx_view_);
return;
}
}
} else {
dispatch(func);
}
+
+ restartCursor(lyx_view_);
}
theLyXFunc().setLyXView(lyx_view_);
theLyXFunc().processKeySym(key, mod);
-
- /* When we move around, or type, it's nice to be able to see
- * the cursor immediately after the keypress.
- */
- startBlinkingCursor();
}