engine: the Korean keyboard's 한/영 and 한자 keys

A Korean keyboard sends Hangul and Hangul_Hanja for its two extra keys;
they did nothing but end the composition.  Now 한/영 toggles Korean and
English and 한자 opens the Hanja search, by standing in for Ctrl+S,
Ctrl+T, and Ctrl+H, as fcitx5-hangul binds them.
This commit is contained in:
2026-08-17 00:54:36 +09:00
parent 63fc60dc06
commit b77400fa86
4 changed files with 29 additions and 0 deletions

View File

@@ -1855,6 +1855,22 @@ engine_hanja_input_languages(struct ct *t)
checkstr(t, "Japanese Hanja commit", "", &com);
CT_EQ_INT(t, LangJP, im.l->lang);
/* The keyboard's own keys: 한자 seeds like Ctrl+H, 한/영 toggles. */
init();
im.l = getlang(LangKO);
sclear(&com);
if(typekeys(t, "gks", &com)){
CT_CHECK(t, keystroke(Khanja, 0, &com));
checkstr(t, "Hanja key seed", "", &search.text);
CT_EQ_INT(t, 2, im.nkouho);
CT_CHECK(t, keystroke(Khangul, 0, &com));
checkstr(t, "Hangul key commits the query", "", &com);
CT_EQ_INT(t, 0, search.lang);
CT_EQ_INT(t, LangEN, im.l->lang);
CT_CHECK(t, keystroke(Khangul, 0, &com));
CT_EQ_INT(t, LangKO, im.l->lang);
}
init();
im.l = getlang(LangEN);
sclear(&com);