30 June 2019

UK IBM Model-F XT Keyboard in LINUX

Leave a Comment
UK IBM Model F XT Keyboard and Soarer's Converter

The Model F keyboards produced for IBMs original PC's the 5150 and 5160s don't play nicely with modern computers. Incompatibility is largely due to the changes in the key encoding protocols adopted for AT style PC keyboards. This lack of compatibility has been a real shame as by enlarge the keyboards are mechanically superior to the latter Model M.

Like the Model M, the F's mechanical keys are designed around buckling springs, unlike Model M's however the F series use capacitive PCB's and not rubber membranes to register key travel, leading to a superior if more costly to produce mechanical keyboard.

Of course all this history is largely redundant if you can't actually use a Model F keyboard on today's PC's. Luckily for us with the use of an easy to come by adapter the "XT Keyboard To USB Soarer's Converter" it's quite a simple task getting a 38 year old keyboard up and running without much fuss. If wish to build your own adaptor all the plans and files are available for the Soarer converter on Geekhack.

Having come across a Model F recently, I took the easy option of ordering a pre-made converter. Everything worked brilliantly and I had a perfectly functional keyboard in minutes. Although there was a minor issue with the keyboard layout. Oddly for Australia where we normally have US keyboards, the Model F in my possession has a UK layout this takes a little extra configuration before working just right with LINUX.

UK Keyboard, the Simple Part

The easy part is simply adding a standard UK layout to the existing keyboard configurations. In XFCE this is normally done from Settings/Keyboard. The exact location and nature of the settings tool will vary between XFCE, GNOME or the KDE desktops, but process remains the same. The UK mapping will take care of 95% of out layout changes, however there are 3 keys on the UK layout that do not match with the standard 101 AT layouts. The misbehaving keys are " \ ", " ' " and " # ".

Quick and Dirty Config Change

Ubuntu based LINUX distributions use XKB to configure and drive keyboard layouts. To make lasting changes that will survive all distribution and package upgrades we would need to write configuration files specifically for the Model F keyboard, but there is a quick and dirty hack we can employ. As long as the Model F is your only intended UK keyboard, and we are aware we may need to redo any changes after a package upgrade, we can simple edit the default UK layout file.

First open XBB's keyboard UK symbols file for editing

sudo nano /usr/share/X11/xkb/symbols/gb

Find the default layout, this should be at the top of the file and make the below changes highlighted in red.

default  partial alphanumeric_keys
xkb_symbols "basic" {

    // Describes the differences between a very simple en_US
    // keyboard and a very simple U.K. keyboard layout defined by
    // the SVR4 European Language Supplement and sometimes also
    // known as the IBM 166 layout.
    // Modifications for IBM Model-F Keyboard

    include "latin"

    name[Group1]="English (UK)";

    key  { [         2,   quotedbl,  twosuperior,    oneeighth ] };
    key  { [         3,   sterling, threesuperior,    sterling ] };
    key  { [         4,     dollar,     EuroSign,   onequarter ] };

    key  { [apostrophe,         at, dead_circumflex, dead_caron] };

    // key  { [     grave,    notsign,          bar,          bar ] };
    key  { [    numbersign,     asciitilde,          bar,          bar ] };

    // key  { [numbersign, asciitilde,   dead_grave,   dead_breve ] };
    key  { [ backslash,        bar,       notsign,        brokenbar ] };

    // key  { [ backslash,        bar,          bar,    brokenbar ] };
    key  { [ backslash,   bar,            backslash,      bar ] };

    include "level3(ralt_switch_multikey)"

After saving you'll need to log out or reboot the Computer. Once logged back in again the Model F should work like a charm in UK mode. You could even right a blog post with it.

If You Enjoyed This, Take 5 Seconds To Share It


Post a Comment