/* constructor */
PinyinEngine::PinyinEngine (IBusEngine *engine)
: m_engine (engine),
- m_prev_pressed_key (0),
+ m_prev_pressed_key (IBUS_VoidSymbol),
m_input_mode (MODE_INIT),
m_fallback_editor (m_props)
{
retval = m_fallback_editor.processKeyEvent (keyval, keycode, modifiers);
/* store ignored key event by editors */
- m_prev_pressed_key = keyval;
+ m_prev_pressed_key = retval ? IBUS_VoidSymbol : keyval;
return retval;
}
}
void reset (gboolean need_update = TRUE) {
+ m_prev_pressed_key = IBUS_VoidSymbol;
m_input_mode = MODE_INIT;
for (gint i = 0; i < MODE_LAST; i++) {
m_editors[i]->reset ();