Building A True Unix Keyboard


compact keyboards that do away with a third of the keys you would usually find on a normal-sized keyboard are all the rage now, but for [jonhiggs], they weren’t good enough. There is a long tradition of Unix shortcuts these compact keyboards don’t pay attention to – CTRL-A being the Home key, and CTRL-D being the Page Down key. To fix this horrible oversight of Unix history, [jon] tore apart one of these compact keyboards, rewired the switch matrix, and made his own perfect keyboard.

The keyboard [jon] is using is a Filco Minila, a very nice and high quality keyboard in its own right.  After mapping out the switch matrix, [jon] wired all the switches up to a Teensy 2.0 loaded up with the TMK firmware. This is a pretty standard way of building a custom keyboard, and [jon] could have just cut a switch plate and installed panel-mount switches and wired up the matrix and diodes point to point. The case for the keyboard is constructed out of Lego.

Because this is a true, modern Unix keyboard, [jon] needed to connect this keyboard to a box running his *nix of choice. He’s doing this in the most future-retro way possible, with an Amazon EC2 instance. This project isn’t done yet, and [jon] is hoping to add an ARM dev board, an iPad Retina display, battery, and SSD, turning this into a completely homebrew laptop designed around [jon]’s needs.

20 thoughts on “Building A True Unix Keyboard

  1. It’s nice to see Control and CapsLock swapped. Am I the only one who thinks CapsLock is undeserving of a dedicated key in a prominent location? I have to hold shift to type a question mark, plus sign, colon, sign, or underscore, while CapsLock has a dedicated oversize key of equivalent location to Enter….

    1. No, you’re not the only one. Caps lock is the one key I have NEVER intentionally hit on any keyboard, but often hit accidentally. I don’t want this to degenerate into an editor wars thread, so I’ll just say that my editor of choice uses quite a few Ctrl keys. So I wanted to remap Caps Lock to Ctrl

      I’m stuck on Windows for my work computer. This kind of remapping is not a difficult hack on Windows, using regedit on “HKLM\SYSTEM\CurrentControlSet\Control\KeyboardLayout\Scancode Map”. That’s not at all intuitive, and it’s awfully hidden, but it works. One reasonable explanation of the strategy is here:

      1. The way I have it set up, capslock is control, control sends my Tmux prefix and Function1-Shift is capslock. Apart from testing I don’t think I’ve ever used the capslock in the 6 months it’s been my daily keyboard.

      1. I remapped capslock to layout switch (cyrillic/latin), so now it is usefull, and in good location.
        Keep it there, it is much more convenient to switch language via big key, than use alt-shift, or ctrl-shift

  2. Nice hardware munging, but wouldn’t the definition of a ‘true Unix keyboard’ be that of an ASR33 Teletype?
    Funny, I don’t recall they came with an inverted-T cursor layout :)
    Just goes to show how subjective a term like ‘true Unix’ means to some, and not to others really. I’d say it was more of a ‘truly personal’ keyboard.

    1. While I wanted to mumble something about scottish dudes, you are right. For some ancient programs still in common usage you must know the funky arrow key layout that once was on teletype terminals. Seeing a True Unix keyboard with arrow keys feels strange knowing that.

  3. One day I killed myself. Earlier that day I used a Solaris keyboard. It was 2 years ago. At a computer lab at a relatively well respected engineering school. Why UMD, WHY?

  4. I thought ^d was end of transmission, similar to an EOF character, most interactive shells seem to handle it this way. Which behavior is correct, that or page down as indicated in the summary?

    1. Right – ctrl-D on a REAL(TM) Unix keyboard generates the ASCII EOT (end of transmission) character, and many unix programs interpret as end of stream. VI (the Unix editor) uses ctrl-D for page down – maybe that’s the motivation here?

  5. Being a Unix geek from the time before X, I find this concept beyond bizarre. Nice work on the hardware and such, but the purpose is invalid. Unix always has, and always will, have an interface to define what hardware you have attached at a terminal (TTY) so that whatever buttons/keys it has will perform the standard Unix functions. One also needs to define which control or escape sequences perform other things such as reverse video and so forth (from the text only days). X has continued this open mindset. The only Unix derivative I know of that does it’s best to hide and/or control this openness is OSX.

    Now if you don’t have root privileges, and therefor can’t redefine your environment, this hack would have a valid purpose.

    Under either scenario, I strongly object to the term “true Unix keyboard”. As previously explained, there is no such thing, though the DEC VT100/ANSI derivatives come closest.f And please, for the sake of /games/adventure, please don’t confuse vi commands with terminal/OS functions. Vi is the king of all editors, for sure, but Vi and Unix are and always will be different things with a different purpose.

    mv /dev/trueunixkeyboard /dev/null

    1. I understand what you are saying, and for a part I agree. What I found was there were things that were impossible to do via software only, particularly anything to do with remapping the hardware function keys. They only change the internal state of the keyboard and are not registered as a key code by the OS.

      Upon hacking open the individual keys to send whatever I liked, I was able to have any layout I could dream, and have it persist anywhere I plugged they keyboard in. It also made using android as a thin-client much more viable possibly.

      I’m sorry that you object to the title “True Unix Keyboard”. I drew inspiration from VI, Emacs, readline and some other tools to determine an ideal key map for the way I use Unix. I also spent time changing the behaviour of keys to better suit my use case. For instance I have better compatibility with my tools when ctrl-h sends a backspace rather than a ctrl-h. I don’t mean to say that this is the one and only Unix keyboard, it’s more a dig at Filco. They kind of allowed a Unix keyboard with the dipswitch settings, but I feel I’ve improved where theirs was lacking, and since tweaked it for my own preferences.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.