engine: romaji is case-blind

Shift or Caps Lock made a Japanese key pass through as a Latin capital,
so nothing composed with Caps Lock on; Korean already folds case. Latin
text still has Ctrl+T.
This commit is contained in:
2026-08-16 21:30:59 +09:00
parent 91b3e538f1
commit 693a1210a6
2 changed files with 10 additions and 0 deletions

View File

@@ -700,6 +700,8 @@ transition(u32int ks, u32int mod, Str *com)
return 0; return 0;
if(im.l->lang == LangKO) if(im.l->lang == LangKO)
ks = kokey(ks, mod); ks = kokey(ks, mod);
else if(isjp(&im) && ks >= 'A' && ks <= 'Z')
ks += 'a' - 'A'; /* romaji is case-blind, Caps Lock included */
if(search.lang) if(search.lang)
return searchkey(ks, mod, com); return searchkey(ks, mod, com);
n = movedelta(ks); n = movedelta(ks);

View File

@@ -1182,6 +1182,14 @@ engine_japanese_backspace_and_boundaries(struct ct *t)
CT_CHECK(t, keystroke(' ', 0, &com)); CT_CHECK(t, keystroke(' ', 0, &com));
checkstr(t, "real input boundary", "かんじ ", &com); checkstr(t, "real input boundary", "かんじ ", &com);
} }
init();
im.l = getlang(LangJP);
sclear(&com);
if(typekeys(t, "KA", &com)){
impre(&im, &shown);
checkstr(t, "uppercase romaji", "", &shown);
}
} }
void void