Problems using a TMK converted JIS layout keyboard with English/Chinese input method

akkk44

11 Aug 2022, 13:30

Recently I got my hands on an IBM 5576 Japanese keyboard. While using a cheap PS2-USB converter, everything works fine.
By "fine", I mean that the characters and punctuation marks are exactly same with the key caps. For example, I can input the " mark with shift+2 with no problem.

However, when I switched to a TMK converter for better flexibility, I ran into trouble really soon. The shift+2 key combination no longer inputs " , it now inputs @ as it is on a 101/102 key English keyboard.
To get the input and the key caps aligned, I have to modify the registry of Windows to force the English input method to use the 106 key layout DLL file. Which can be really annoying because I am hooking up the 5576 with my laptop, which has a 101/102 key English layout.

Is there a way to let the TMK converter just work as the cheap dumb PS2-USB converter, while maintaining the flexibility of TMK?

Thanks in advance!
Attachments
QQ图片20220811192659.jpg
QQ图片20220811192659.jpg (1.13 MiB) Viewed 999 times

User avatar
depletedvespene

11 Aug 2022, 14:03

As things go, I have the same keyboard currently in active duty, plugged with a TMK converter, and have no problems with it, including my own custom national layout.

You're mixing up things, so allow me to explain, quoting myself from another recent thread:

When you press a key (say, the ;: key in a common English (USA) keyboard), what the keyboard sends to the computer is a scan code] (0xC0); the operating system looks up that scan code in a table, which is the national or logical layout you've selected (English (USA)), and produces the ; character you wanted. If you select a different national layout in the operating system, the same 0xC0 scan code will end up producing, say, Ñ (Spanish layouts), Ö (German layout), C (Azeri layout), et cetera.

I would bet money that the "cheap converter" is actually recognizing that you are using a bit-paired keyboard (the 5576) and translating the scan codes it sends to the computer, so the operating system is clueless and thinks that (in the case of " vs @), it was sent a scan code of 0xDE instead of 0x32. TMK does not do that because... it's not its job. Instead, if you're using Windows, simply program the alphas normally on TMK and use a program like MSKLC to make a custom "English (bit-paired)" logical layout that will match the printed legends on each keycap.

Another option would be to do what Ananta tried first and emulate within TMK the Shift layer, but I find that to be cumbersome and is not worth the effort.


Saturday is coming. I am tempted to do that custom logical layout myself, for the benefit of everyone. :mrgreen:

akkk44

11 Aug 2022, 14:28

Thanks a lot for your detailed reply!
Currently I am using a software named KBDEDIT to generate a custom DLL layout file and assign it to the input method. According to your replay, the other way would be writing code to translate the scan code like the "Emulate US layout on German computer" example here? (https://github.com/tmk/tmk_keyboard/wik ... n-computer)
If this is the case, maybe I will just stick around with my current setup...
depletedvespene wrote:
11 Aug 2022, 14:03
As things go, I have the same keyboard currently in active duty, plugged with a TMK converter, and have no problems with it, including my own custom national layout.

You're mixing up things, so allow me to explain, quoting myself from another recent thread:

When you press a key (say, the ;: key in a common English (USA) keyboard), what the keyboard sends to the computer is a scan code] (0xC0); the operating system looks up that scan code in a table, which is the national or logical layout you've selected (English (USA)), and produces the ; character you wanted. If you select a different national layout in the operating system, the same 0xC0 scan code will end up producing, say, Ñ (Spanish layouts), Ö (German layout), C (Azeri layout), et cetera.

I would bet money that the "cheap converter" is actually recognizing that you are using a bit-paired keyboard (the 5576) and translating the scan codes it sends to the computer, so the operating system is clueless and thinks that (in the case of " vs @), it was sent a scan code of 0xDE instead of 0x32. TMK does not do that because... it's not its job. Instead, if you're using Windows, simply program the alphas normally on TMK and use a program like MSKLC to make a custom "English (bit-paired)" logical layout that will match the printed legends on each keycap.

Another option would be to do what Ananta tried first and emulate within TMK the Shift layer, but I find that to be cumbersome and is not worth the effort.


Saturday is coming. I am tempted to do that custom logical layout myself, for the benefit of everyone. :mrgreen:

Post Reply

Return to “Keyboards”