For Japanese (JIS) keyboard users (some Key codes have been shortened)

Talk about anything
neokix
Posts: 11
Joined: 10 May 2017, 07:50
Contact:

For Japanese (JIS) keyboard users (some Key codes have been shortened)

26 Dec 2017, 21:25

I'm posting this for the sake of informing/warning JIS keyboard users for recent changes of keycodes, that is very critical to the use of AutoHotkey.
Because I was like "what? why my script not working? " and then after reading those change logs, I became "AHA!"

Yes, I should have posted this somewhere else or other forums, but since not many people use AutoHotkey in Japan and it's the only place that people can reach so please forgive me. Well, the Japanese wiki owners locked normal users away since 2013! so...

After the build 1.1.27.00 (latest for now), the keycode for JIS keyboards (and I suppose others ) have been altered (shortened).
Now, don't have to remember all the letters that come after vk. Just vk codes are required.

Hence,

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

Muhenkan / 無変換 -> {vk1D}
Henkan / 変換 -> {vk1C}
Kana / かな -> {vkF2}
IME ON/OF -> {vkF3}, {vkF4}


Oh, and if you are interested in keyboard overseas, JIS keyboards have extra 4 keys! lol
With AutoHotkey, I am very happy using them, since those keys are in good position, but not really useful in vanila Windows.

For Japanese speakers I repeat myself in Japanese a bit.
*ビルド1.1.27.00以降,上のようにキーコードが変更になりました.ご注意ください.
User avatar
gregster
Posts: 937
Joined: 30 Sep 2013, 06:48

Re: For Japanese (JIS) keyboard users (some Key codes have been shortened)

26 Dec 2017, 22:21

I assume it has to do with "Scripts containing hotkeys of the form VKnnSCnnn:: will need to be corrected by removing SCnnn, which was previously ignored." (compare https://autohotkey.com/boards/viewtopic ... 97#p190697)

In that case, the vk codes above would have already worked before, but the "long version" was understood just the same. But it contained a syntax error that was ignored before (but could lead to problems in some cases). At least that is my understanding of the changes. Of course, I don't even know how your script looked before.
neokix
Posts: 11
Joined: 10 May 2017, 07:50
Contact:

Re: For Japanese (JIS) keyboard users (some Key codes have been shortened)

27 Dec 2017, 06:24

Hi, gregster! Thanks for the reply.

That change made my script even unloadable once (but it was solved by removing SCnnn).

I'm not really sure how those key codes works, but since using those keys as simple remapping, longer version used to work just fine.
But omitted(?) version is easy to remember and type, so no complain there.
Just need to remove/replace some codes, I guess. Surprising first, but welcomed.
lexikos
Posts: 5811
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: For Japanese (JIS) keyboard users (some Key codes have been shortened)

16 Jan 2018, 04:12

That change made my script even unloadable once (but it was solved by removing SCnnn).
That is because your script contained an undetected error: SCnnn. Writing vk1Dsc123:: (or whatever sc number) was the same as writing vk1Dthisisnotvalid:: (except that if you wrote both, they were not considered duplicates, and only one would work).

My intention in making the script "unloadable" was to alert the user (such as yourself) to the error in the script and hopefully correct any misunderstandings about its use (e.g. the misbelief that the suffix had some effect, that it was necessary, or that the hotkey would only fire if the scan code matched what was specified).
neokix
Posts: 11
Joined: 10 May 2017, 07:50
Contact:

Re: For Japanese (JIS) keyboard users (some Key codes have been shortened)

30 Jan 2018, 03:38

Thank you for replying, Lexikos.
I truly appreciate what you are creating.
If you are, please don't get me wrong. I am not criticising anyone or any changes that you or others make. Simply informing people who have Japanese layout keyboards.

One thing you might need to know about my previous post is, Japanese ahk wiki isn't perfect.
As far as I know, all of Japanese websites that mention about special keys in Japanese keyboards are saying "This special key (eg. Muhenkan-key) corresponds to vkXXscnnn" since 2014, and describe no further about what is vk, nor sc.
And all wikis are locked by previous admins who abandoned the wiki, and I have no way contacting them.
So it is natural (for Japanese speakers at least) to consider vkXXscNNN as the proper way of using those keys.

And as you might know, people who just started using ahk to remap those keys usually don't know how to use #InstallKeybdhook or any other convenient functions.
That's why I wrote it in the first place at this forum, to inform in more specific and casual way.

By the way, your change actually changed my vision about how vk and sc work, so yes, your intention worked with your explanation.
But it is also true that some people who are using AutoHotkey without much knowledge of English language actually got confused by sudden "unloadable error", which is quite upsetting, as you can also imagine.

But again, here, I am not criticising anyone or any changes that you or others make. Simply informing.

Sorry about this rather long post. I hope this reaches you.

Return to “Offtopic”

Who is online

Users browsing this forum: No registered users and 5 guests