I happened to have a Japanese keyboard, a type of 109 keyboard
lexikos wrote:Does one keycode switch to "Hankaku" mode and the other switch to "Zenkaku" mode?
That's right. They share the same physical key and it toggles the mode. Zenkaku means full width and Hankaku means half width.
When typing Japanese words, one has to use input software such as Microsoft IME bundled with Windows installation. There are other ones besides Microsoft IME such as Google IME, ATOK, and Baidu IME etc. And it seems the sent virtual key codes differ depending on the software. I checked only with Microsoft IME and Google IME so the number of samples may be too few to determine the behavior.
I used the InputKey() funciton (https://autohotkey.com/board/topic/8059 ... -keypress/
) to check which virtual key code is sent when pressing it.
Microsoft IME has the following five input modes which the user has to select when typing. (a) and (e) are mostly used and other modes are occasional.
b) Zenkaku Katakana
c) Zenkaku Eisu
d) Hankaku Katakana
e) Hankaku Eisu
Google IME has the following six modes. (a) and (f) are mostly used and others are occasinal.
b) Full-width Katakana
c) Full-width Alphanumric
d) Half-width Katakana
e) Half-width Alphanumeric
f) Direct Input
I see different results by pressing the Zenkaku/Hankaku key:
- when none of the input software is selected in the language bar.
- when Microsoft IME is selected and the input mode is Hiragana, Zenkaku Katakana, Zenkaku Eisuu, or Hankaku Katakana
- when Microsoft IME is selected and the input mode is Hankaku Eisu
- when Google IME is selected in the language bar, regardless of which input mode is selected
lexikos wrote:If that's the case, wouldn't it be better to use the more meaningful names to distinguish between the two rather than "1" and "2"?
I agree. Naming them should be more careful. Once it is published, it becomes hard to change.