Remapping \ and | on US Keyboards in UK Layout

IBM Model M, US Layout

Lately I’ve started a small collection of IBM Model-M keyboards. Well, two. And a modern Unicomp Model-M that I somehow managed to murder. The problem with the original ones is that they’re not the usual layout, for me. One is a Portuguese layout, and the other is a US layout. Both have the problem that one of the keys I need isn’t available. The key in question is the one I’d ordinarily get “\” and “|” from. This key is at the bottom left of the Irish keyboard layout (and the UK layout, which is very similar), next to Z. The key does not exist on US layout keyboards. There is a key with those two symbols on it, but that key serves the purpose of the Irish “#” and “~” key, both of which are found elsewhere on the US keyboard layout. In short, we have an extra key here that US keyboards simply do not have.

Sorry about the long pre-amble. Here’s the meat: on my main computer (a laptop that travels around with me from desk to desk, where I have my various Models-M), I run both Linux and Windows. And, being a bit of a techie, I need both “\” and “|” to work for me, so I put them under the key to the left of the digit “1”, the one that usually does “`” and “¬” and “¦“. Here’s how I did it.

Short version.

In Linux:

 xmodmap -e 'keycode 49 = grave bar grave bar backslash brokenbar'

In Windows:

Download and run the Microsoft Keyboard Layout Creator, and create a new Layout.
http://www.microsoft.com/en-us/download/details.aspx?id=22339

Continue reading