- KmodInfo i;
- string res;
-
- if (c == 0 && active_ != default_) {
- // A deadkey was pressed that cannot be printed
- // or a accent command was typed in the minibuffer
-
- if (active_->isAccentDefined(accent, i) == true) {
- res = trans_fsm_.currentState->deadkey(c, i);
- insert(res, t);
- return;
+ if (c == 0 && active_ != &default_) {
+ // A deadkey was pressed that cannot be printed
+ // or a accent command was typed in the minibuffer
+ KmodInfo i;
+ if (active_->isAccentDefined(accent, i) == true) {
+ string const res = trans_fsm_
+ .currentState->deadkey(c, i);
+ insert(res, t);
+ return;
+ }
+ }
+
+ if (active_ == &default_ || c == 0) {
+ KmodInfo i;
+ i.accent = accent;
+ i.data.erase();
+ string res = trans_fsm_.currentState->deadkey(c, i);
+ insert(res, t);
+ } else {
+ // Go through the translation
+ translateAndInsert(c, t);