Names for Japanese special keys

Propose new features and changes
lexikos
Posts: 5686
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Names for Japanese special keys

25 Nov 2017, 23:51

If anyone wants the following key names added, I am just waiting for answers to some questions.

Code: [Select all] [Download] GeSHi © Codebox Plus

+// Special keys in Japanese keyboard
+, {_T("Muhenkan"), VK_NONCONVERT}
+, {_T("Henkan"), VK_CONVERT }
+, {_T("KanaHira"), VK_OEM_COPY }
+, {_T("HanZen1"), VK_OEM_AUTO }
+, {_T("HanZen2"), VK_OEM_ENLW }

Lexikos wrote:
ironsand wrote:VK_OEM_AUTO and VK_OEM_ENLW are emitted by a same key interchangeably in windows. It swaps Japanese input mode and English input mode.

Do you mean alternately (i.e. after each press the keycode swaps)? Does one keycode switch to "Hankaku" mode and the other switch to "Zenkaku" mode? 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"? Similarly, Numpad1 and NumpadEnd are the same key but named according to the effect of the keycode.

https://github.com/Lexikos/AutoHotkey_L/pull/55
A_User
Posts: 35
Joined: 21 Aug 2017, 01:15

Re: Names for Japanese special keys

28 Nov 2017, 17:43

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.
a) Hiragana
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.
a) Hiragana
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:

1. 0xF4 - when none of the input software is selected in the language bar.
2. 0xF0 - when Microsoft IME is selected and the input mode is Hiragana, Zenkaku Katakana, Zenkaku Eisuu, or Hankaku Katakana
3. 0x1B - when Microsoft IME is selected and the input mode is Hankaku Eisu
4. 0xC0 - 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.
lexikos
Posts: 5686
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: Names for Japanese special keys

29 Nov 2017, 17:07

It seems more complicated than I thought. With the key varying that much, I'm inclined to leave it unnamed (and let users continue to rely on VK or SC).

What the conditions are before pressing the key does not tell me what meaning or effect the VK code has.

Return to “Wish List”

Who is online

Users browsing this forum: No registered users and 4 guests