Weirdness with Soarer's Converter + Model F-122 6110445

User avatar
bitslasher

29 Jul 2013, 08:45

Hi guys,
I thought I'd share something I hit while remapping the "Rule" key on my Oct' 84 IBM Model F 3180 Terminal Board. (The "Rule" key is the one at the center of the arrow keys in the middle of the board). I wanted to remap it to be the DOWN arrow. However I found myself at a loss as to what that key mapped to using the documentation that comes with Soarer's Converter.

According to many docs around on the internet, this keyboard should be hard-wired to use scan code set 3, and this particular key should be returning scan code 62. It seemed that scan code 62 corresponded to the PAUSE key of a 10x-key terminal board...so I thought ah-ha! gotcha! So I mapped PAUSE to DOWN. Not so fast, the keyboard said.

PAUSE didn't work. So I resorted to brute force. I just mapped every weird key name I didn't recognize (LANG_X, INTERNATIONAL_X, etc...) to DOWN. What do you know? It worked! So then I started removing mappings until I found the one that worked...it was LANG_4 (Hiragana)!

I did not expect this. This is why: According to the converter's doc, LANG_4 (Hiragana) is HID Code 0x93, but the HID code for Hiragana is supposed to be 0x8B...not 0x93...or at least that's the way I read it. Also, the Set 3 scan code for Hiragana is 0x85. *Every* document about this type of keyboard says that key returns scan code 62...and mine is supposedly returning 0x85 (for Hiragana).

So my question is...where did I go wrong in my assumptions? Or is there a fluke with this board, or is there a fluke in the Soarer doc? This is some more detail about my board:

Model: 6110345
Date: 5-Oct-1984

This is a pretty early Model F terminal board I think...so is it just a fluke? I am hoping someone who's hooked up a bunch terminal boards to a Teensy has some thoughts.

User avatar
Muirium
µ

29 Jul 2013, 11:09

I'd guess an undocumented oddity. If it's just the one key, and you've nailed it, case closed.

A more complex weirdness I get is with CeeSA's Access matrix keyboard, which seems to show up with a different keyboard ID fairly often! The keyboard hardware itself is programmable (not that I've tried yet, needs a Windows host) so I suppose its being too smart for its own good, in some fashion. I'm still to really nail it down.

A programmable converter like Soarer's clearly needs a way to figure out the true identity details that keyboards conceal from it. Feature request: a sixth sense!

User avatar
Soarer

29 Jul 2013, 12:31

It is documented!
  • The converter usually recognises keyboards that use set 3 automatically (i.e. 'force set3' is not normally required). (Intro page)
  • There is a fixed translation stage from set 3 to HID that cannot be modified (this is by design). (Config page)
  • hid_listen lets you see what the converter is doing. (Trouble page)
  • LANG_4 is Hiragana and is HID code 0x93... code 0x8B is INTERNATIONAL_5 which is Muhenkan... code 0x88 is INTERNATIONAL_2 which is Katakana/Hiragana (tranlate.pdf was the reference I used). (Codes page)
Although, in the latest (unreleased) docs I have added a small section to the Config page describing how to use hid_listen for identifying which codes you need to remap, unchanged from this draft:
Initial Translation

For most keys it's fairly obvious which codes are produced after the fixed initial translation. However, for some keys on a 122-key keyboard, and the normally unused extra keys on various keyboards, the codes don't follow an obvious pattern.

To find out which code a key is producing after the fixed initial translation, you can use hid_listen to examine the Diagnostic Output.

When you press a key, a set of codes is sent by the converter to hid_listen. For example, pressing the centre key in the 122-key's cursor block results in:

r62 +93 d93 rE2 -93 u93

Note the code prefixed by '+', then look it up in the HID code list. For the example, looking up 93 reveals that the identifier to use for remapping or triggering a macro would be LANG_4.

User avatar
Halvar

29 Jul 2013, 13:04

This seems to be a most common use case for Soarer's converter, so here's a list of all the special keys on M-122 and F-122 boards that you might want to remap:

EXTRA_F1, EXTRA_F2, ... EXTRA_F10: left hand side function keys, named from left to right, then from top to bottom

F13, F14 ... F24: function keys upper row from left to right, like the legends say.

LANG_4: Central key on the cursor block

ESC: upper left corner on number block
NUM_LOCK: second key on the first line of the num block
SCROLL_LOCK: third key on the first line of the num block
EXTRA_SYSRQ: upper right corner on number block
PAD_ASTERIX: second row, rightmost key on the number block
PAD_MINUS: third row, rightmost key on the number block
PAD_PLUS: fourth and fifth row, lower right corner of the num block, double sized key.

EUROPE_1 (only on ISO keyboards): key directly to the left of the ISO big Return key in the ASDF row. Should be mapped to BACKSLASH to work as expected.

See the example config file Halvar.sc in the documentation for possible remappings. It was originally written for an ISO M-122, but as far as I can tell, it works with all Model M and Model F 122-key terminal keyboards.

User avatar
Soarer

31 Jul 2013, 04:14

Soarer wrote:Although, in the latest (unreleased) docs I have added a small section to the Config page describing how to use hid_listen for identifying which codes you need to remap
Now released :)

User avatar
bitslasher

13 Aug 2013, 17:39

Hi Soarer!

You're right all that stuff was very well documented and I had found it. Thank you for doing all that and also thank you for replying here and expanding on it. It was really weird how my F-122 was behaving.

Btw, your converter with a Teensy has been the most reliable adapter I've used with my keyboards. I have a new Thinkpad laptop which doesn't quite work correctly with the blue cubes I had before for my Model Ms, they have be reinserted after waking up. The Teensey with your code works perfectly though, of which I have two: (one on a F-84 and another on an F-122).

I am planning to post some pics of my boards soon. I have really benefited from all the time and ingenuity of you guys here and on geekhack. My original post on this thread was my humble attempt to give back. :)

Post Reply

Return to “Keyboards”