engine: keys outside a map pass on like any other; one candidate query; the caret rides on every key

Space and non-ASCII keys with a Korean or Telex syllable pending were
committed as text along with the syllable, while '.', ',' and digits
committed the syllable and passed on: one path for both now, through the
language's own trans, which commits and passes on.  Japanese Space is
its own key already.

dictqjp() knows which languages have candidates; its two callers no
longer choose between it and clearkouho().  Every request carries its
owner's caret as the frontend knows it, so a Keypress copies it whether
valid or not, and the XIM frontend need not send a Keycaret to say that
its spot went away.
This commit is contained in:
2026-08-17 01:30:56 +09:00
parent 97a838eda1
commit 3d862bdc0d
3 changed files with 20 additions and 41 deletions

View File

@@ -385,7 +385,7 @@ kpress(Ic *state, xcb_key_press_event_t *ev)
Keyres res;
char buf[Maxutf];
u32int key, sym;
int composed, n, wasvalid;
int composed, n;
sym = keymaplookup(kstate, ev->detail, ev->state);
composed = 0;
@@ -403,12 +403,8 @@ kpress(Ic *state, xcb_key_press_event_t *ev)
break;
}
key = ipckeysym(sym, xkb_keysym_to_utf32(sym));
if(keymeaningful(key)){
wasvalid = state->caret.valid;
if(keymeaningful(key))
place(state);
if(state->engaged && wasvalid && !state->caret.valid)
sendrequest(state, Keycaret, 0, 0, &res);
}
keypress(state, key, ev->state, &res);
n = stoutf(&res.commit, buf, sizeof buf);
commit(state, buf, n);