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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user