APL using Unicomp APL/2 Keyboard

Using a Unicomp APL Keyboard with Soliton SHARP APL for Linux

Whilst on a trip to the USA I picked up a Unicomp APL keyboard, having been a great fan of the original IBM Model M keyboard (some notes on Unicomp keyboards in general can be found below). This was because I had recently discovered the excellent, free (for personal use) implementation of APL called SHARP APL for Linux (or SAX for short) from Soliton Associates.

When I got back, and attempted to use the keyboard, I found that it is actually designed for use with IBM APL2, and uses a completely different layout to the Union keyboard layout supported by default by SAX. Rather than parting with another $1,500 dollars to buy the IBM implementation (even for personal use), I thus set out on a mission to get the keyboard talking to the application :)

The solution is to install an alternative keyboard mapping file saxkey.map and an alternative X-Window mapping file saxmod.map. If you install SAX into the default location, these files are both stored in the directory /usr/sax/rel/lib/term. Once replaced, and the X-Window System restarted (CTRL-ALT-Backspace), most of the APL character set supported within SAX can be produced using the Unicomp keyboard.

Use of the new keyboard mapping

The new keyboard mapping makes use of the SHIFT keys and the left and right ALT keys. The left ALT key selects the symbols on the tops of the keyboard keycaps. Where two symbols appear, one above the other, the higher symbol can be selected by pressing SHIFT and left ALT together. The symbols located on the front of the keycaps can be selected by pressing the right ALT key, together with the required key. There are a few special cases that are worth mentioning:

APL Overstrike

As mentioned in the SHARP APL Handbook, it is possible to generate a subset of the special characters using overtyping where the symbol can be formed from two others. This is done by entering the first symbol, selecting the APL overstrike key (by default mapped to CTRL-P) and then pressing the second symbol. Whilst virtually all the symbols have a key within the Union keyboard map, using the Unicomp keyboard requires some overstriking.

APL Keyboard Layouts

The Union keyboard layout, used by default in SAX is:

Union keyboard layout
(click here for a large version of this image).

The Unicomp keyboard looks like this:

Unicomp APL keyboard layout - top
(click here for a large version of this image).

and this from the front:

Unicomp APL keyboard layout - front
(click here for a large version of this image).

The required keyboard mapping file is saxkey.map, download here and the X-Windows modifier map is saxmod.map, download here.

Unicomp Keyboard Notes

If you are a die-hard keyboard fan like myself, you might appreciate some info on the quality of current Unicomp keyboards. I own an original model M, so have good basis for comparison. I bought two keyboards from Unicomp, the 101-key APL keyboard and the 122-key PC/5250. My original plan was to form one, giant super-keyboard by transferring the APL keycaps from the 101-key keyboard with the standard keycaps on the 122-key emulator keyboard. The problem with this plan is that whilst the APL keyboard has a straight return key and a double-size backslash key above it, the emulator keyboard has an L-shaped return key and a standard size backslash key beside it. I can transfer all APL keycaps apart from the backslash key (which has three APL symbols on it), but I am a bit of a perfectionist and decided to keep the keyboards separate.


Both keyboards I bought use the noisy buckling-spring technology. The actual mechanism is different from that employed in my original Model M. The original keyboard has separate key caps like hoods that snap over the individual keys. Underneath the hoods are slightly smaller, rectangular blank keycaps. On the new Unicomp keyboards, there is no separate hood - the keycap is formed onto a 'stalk' that snaps round the key base. A little spring pokes out of the base on the new keyboards when the keycaps are removed. If you need to remove them I recommend using a dull screwdriver edge (the large flat screwdriver attachment on Swiss Army Knives are perfect). Ease the blade under one side of the keycap and gently apply pressure to the other side. With a bit of practice they pop off very easily, especially when you have a few to remove as you can get much better access.


As for that all-important feel, well, there is a slight difference. The original model M feels a little more solid, like it is made out of Bakerlite rather than plastic. The new keyboards are still substantial and I would imagine from the weight they still incorporate the same metal baseplate. In operation, the new keyboard gives very slightly more, and sounds slightly less solid. Having said that, there is not an awful lot of difference and you would have to be a serious keyboard-snob if you insisted on the original model M over this model. I was surprised how good the current model is, considering the relatively cheap price. You will still be getting a serious, quality keyboard that should improve with age (at least if you clean it once in a while!). Not forgetting that these babies are new - you get them wrapped in plastic and smelling good - not grubby and discoloured like a lot of model Ms end up (even if they still work fine). On top of that, there doesn't appear to be any alternative for APL keyboards, apart from keyboard stickers, and this is a hell of a lot more civilized! It was the only excuse I needed...

Ordering & Shipping

If you are planning on ordering a keyboard whilst visiting the USA, check the delivery times. Most people in the UK think next-day delivery is standard, but in America (understandably) delivery times for surface mail tend to be longer, typically around three days. The PC/5250 have to be individually programmed (depending on whether you want the one with standard PC scancodes or not) and this took another day. Remember also to take into account the weight when returning to the UK - the two keyboards combined weighed a total of 12 lbs (5.5 kgs!), which equates to about $150 in excess baggage if they push you over the limit!

If you have any problems, I will be happy to help, you can reach me at mark@wickensonline.co.uk.

Copyright (C) 2003, Mark Wickens, Rhodium Consulting Ltd