engine: a key that converts nothing is the application's
Space and Tab convert a Japanese reading, and a reading with no candidate to step through was committed and the key eaten. Katakana mode converts nothing -- katakouho adds the Katakana form only when it differs from the reading, and in Katakana mode it never does -- so every Space between two Katakana words was swallowed and had to be typed twice: カク<Space> committed カク and left no space, and the second Space passed through only because nothing was pending any more. Committing and passing the key on gives the space back. Hiragana is unchanged wherever the reading has kana, since the Katakana form is always one candidate there; it changes only for a reading that made no kana at all, かx<Space>, which now commits and spaces too. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -41,7 +41,8 @@ kana shown, and romaji that made no kana stays as typed until it is mended;
|
||||
The dictionary keys verbs and adjectives by stem and okurigana, so `kaku`
|
||||
offers かく's readings and then 書く and its kin — typing the okurigana
|
||||
with `Shift`, as SKK does, `kaKu`, asks for that split first. Katakana
|
||||
mode does not convert.
|
||||
mode does not convert, so there `Space` and `Tab` commit the reading and
|
||||
go on to the application.
|
||||
|
||||
Korean composes one syllable at a time. `Enter`, `Tab`, `Esc` and any key
|
||||
that is not a jamo commit the syllable and go on to the application, so
|
||||
|
||||
11
strans.c
11
strans.c
@@ -871,12 +871,15 @@ transition(u32int ks, u32int mod, Str *com)
|
||||
if((ks == ' ' || ks == Ktab) && isjp(&im) && haspre(&im) &&
|
||||
!(mod & ~Mshift)){
|
||||
/* Space and Tab convert: they step through the candidates,
|
||||
* Katakana last; a reading with none is committed. */
|
||||
* Katakana last. Katakana mode converts nothing, so there
|
||||
* the key only commits, and then it is the application's:
|
||||
* the space between two Katakana words is a space. */
|
||||
katakouho();
|
||||
if(im.nkouho != 0)
|
||||
cyclekouho(mod & Mshift ? -1 : 1);
|
||||
else
|
||||
if(im.nkouho == 0){
|
||||
flush(com);
|
||||
return 0;
|
||||
}
|
||||
cyclekouho(mod & Mshift ? -1 : 1);
|
||||
return 1;
|
||||
}
|
||||
if(ks == Ktab || ks == Kret || (ks == Kesc && !isjp(&im))){
|
||||
|
||||
@@ -1441,6 +1441,16 @@ engine_katakana_sequences(struct ct *t)
|
||||
checkstr(t, "committed Katakana", cases[i].want, &com);
|
||||
}
|
||||
CT_EQ_PTR(t, nil, getlang(LangJPK)->dictname);
|
||||
|
||||
/* Nothing to convert to: the key commits and goes on to the client. */
|
||||
init();
|
||||
im.l = getlang(LangJPK);
|
||||
sclear(&com);
|
||||
if(typekeys(t, "kaku", &com)){
|
||||
CT_CHECK(t, !keystroke(' ', 0, &com));
|
||||
checkstr(t, "Space commits the Katakana", "カク", &com);
|
||||
CT_EQ_INT(t, 0, im.nkouho);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user