Configure IMB/Lexmark/Unicomp Model M Keyboard Remaps with Soarer's Converter in Linux
So, many of us have and hold our old model m keyboards till death do we part. For good reason too, these keyboards are legendary for a reason! There’s no reason to use something else if your new computer doesn’t have the right ports to support our little friend. The Soarer’s Converter has us all covered! Here’s how to program it.
This article is a companion to the video found here.
TLDR: You can go ahead and buy the adapter and just plug it in and you will be mostly just fine… unless you have the terminal variant, which needs a little help. That’s where this guide comes in.
Start by obtaining a Soarer’s Converter here. They typically cost about $40 at the time of this writing.
There are a couple tools and docs we need:
sctools (please watch the video as there is a gotcha here we work through)
hid_listen (optional, but very useful in matching up key codes)
GenericEric’s repository (optional, contains config examples)
hid_listen - Use to find key codes
Plug your Model M into the converter and then into your computer. You dont have to reboot your PC for it to recognize your old ps/2 or rj45 keyboard, because now it’s USB… Nice!
Download hid_listen and make it executable.
chmod +x hid_listen
Run by issuing
sudo ./hid_listen in terminal. Press keys on the keyboard and the output will give you keycodes. The important part is when I press “a”, “+04” shows up in a column. This translates to 0x04 in the Soarer’s docs “Codes” page as you see below. You see that “a” is also listed, but some keys will not give you this convenient output, so you will have to look at the “Codes” page to match them up.
sctools - Use to convert your config to binary and write it to the converter
As I stated above, there’s a slight gotcha on this one. hidapi currently does not download with the repo, so you will need to download that separately and extract it to the hidapi directory in the repo.
Grab the sctools repository by issuing
git clone https://github.com/thentenaar/sctools.git
Download the hidapi directory and extract it’s contents into the hidapi directory in sctools.
Run
./autogen.sh
Run
make
Run
sudo make install
Now you have sctools installed and can use the commands we need to program our converter.
The configuration
If you cloned or looked at my repository, you have the basic remapping config we will use.
terminal.sc consists of the following:
remapblock
CAPS_LOCK LGUI
F13 ESC
F23 PRINTSCREEN
F24 SCROLL_LOCK
EXTRA_SYSRQ PAD_MINUS
PAD_MINUS PAD_PLUS
PAD_ASTERIX UNDO
PAD_PLUS PAD_ENTER
ESC MEDIA_VOLUME_DOWN
NUM_LOCK MEDIA_VOLUME_UP
SCROLL_LOCK MEDIA_CALCULATOR
LANG_4 PAUSE
endblock
This is extremely simple and straight forward. You can see we remap the caps lock key to register as a super key(LGUI), F13 remaps to escape, etc.
Make your choices of what keys you want to remap and save the file.
Issue
scas terminal.sc terminal.scb and you will now have the .scb file.
Issue
sudo sctool write terminal.scb and it will write your config to the converter.
Congratulations, you now have a converter with programming to map your keys! You can plug it into any PC and your config will remain. If you ever want to change these remappings, just edit your .sc file, generate a new .scb file, then write it to the device.