fix: normalize Korean shifted input

This commit is contained in:
2026-08-12 15:32:28 +09:00
parent 6dfbc08704
commit f0ba7fc5f6
5 changed files with 148 additions and 18 deletions

View File

@@ -159,6 +159,8 @@ dictqmap(Im *im)
clearkouho();
show();
if(im->l->map == nil)
return;
if(!mapget(im->l->map, &im->pre, &dict))
return;
dictsend(im, &dict);
@@ -374,6 +376,16 @@ ctrlkey(Rune c)
return c;
}
static Rune
kokey(Rune c, u32int mod)
{
if(c >= 'A' && c <= 'Z')
c += 'a' - 'A';
if((mod & Mshift) && c >= 'a' && c <= 'z')
c -= 'a' - 'A';
return c;
}
static int
ismodkey(u32int ks)
{
@@ -694,6 +706,8 @@ keystroke(u32int ks, u32int mod, Str *com)
reset();
return 1;
}
if(im.l->lang == LangKO)
ks = kokey(ks, mod);
n = dotrans(ks, com);
show();
return n;