engine: the Japanese keyboard's own keys; keypad arrows move through candidates
半角/全角, ひらがな/カタカナ, 変換, and 無変換 committed the reading and did nothing, like any function key. They now stand for what a Japanese keyboard means by them: toggling Japanese and English, switching kana modes, converting (or turning Japanese on), and turning it off; the Korean keys became a switch of the same shape. The keypad's arrows and page keys, with NumLock off, fold onto the plain ones as its Enter and Tab already did.
This commit is contained in:
24
strans.c
24
strans.c
@@ -765,13 +765,23 @@ transition(u32int ks, u32int mod, Str *com)
|
||||
ks = kokey(ks, mod);
|
||||
else if(isjp(&im))
|
||||
ks = lower(ks); /* romaji is case-blind, Caps Lock included */
|
||||
/* The Korean keyboard's 한/영 and 한자 keys are Ctrl+S or Ctrl+T, and Ctrl+H. */
|
||||
if(ks == Khangul){
|
||||
ks = im.l->lang == LangKO ? 't' : 's';
|
||||
mod = Mctrl;
|
||||
}else if(ks == Khanja){
|
||||
ks = 'h';
|
||||
mod = Mctrl;
|
||||
/* The Korean and Japanese keyboards' own keys, as the Ctrl chords
|
||||
* and Space they stand for. */
|
||||
switch(ks){
|
||||
case Khangul: ks = im.l->lang == LangKO ? 't' : 's'; mod = Mctrl; break;
|
||||
case Khanja: ks = 'h'; mod = Mctrl; break;
|
||||
case Kzenkaku: ks = isjp(&im) ? 't' : 'n'; mod = Mctrl; break;
|
||||
case Kkana: ks = im.l->lang == LangJP ? 'k' : 'n'; mod = Mctrl; break;
|
||||
case Khenkan:
|
||||
if(isjp(&im)){
|
||||
ks = ' ';
|
||||
mod &= Mshift;
|
||||
}else{
|
||||
ks = 'n';
|
||||
mod = Mctrl;
|
||||
}
|
||||
break;
|
||||
case Kmuhenkan: ks = 't'; mod = Mctrl; break;
|
||||
}
|
||||
if(search.lang)
|
||||
return searchkey(ks, mod, com);
|
||||
|
||||
Reference in New Issue
Block a user