Xmodmap

Since I started to hack for profit I found that sometimes a spanish/latam keyboard can be a PITA thanks to the place chosen for 'irrelevant' characters like { }, [ ], /, \, etc.

I have used a latam keyboard all my life, contrary to popular believe a latam keyboard is not the same than a spanish keyboard. Latam keyboard layout however offers some advantages to me (well to me, maybe not for you) like heavy AltGr use, since US keyboard doesn't even consider right Alt as something worth using I tried some other keyboard layouts and found the british english one (en_GB), this layout uses AltGr with passion and also has some modifications to the US layout that I found great.

However, not everything was fine so I decided to make some modifications so my layout would be an hydrib between latam and british layouts. I wanted the following (sorry but explaining where is which key is kind of hard):

So after some wrestling with google and X config docs I came up with this:

keycode 0x5E = less greater less greater bar brokenbar bar brokenbar keycode 0x33 = backslash bar backslash bar dead_grave dead_breve keycode 0x0C = 3 numbersign 3 numbersign threesuperior sterling keycode 0x0B = 2 at 2 at twosuperior oneeighth keycode 0x30 = apostrophe quotedbl apostrophe quotedbl dead_circumflex dead_caron keycode 0x22 = bracketleft braceleft bracketleft braceleft dead_acute dead_abovering keycode 0x2F = semicolon colon semicolon colon ntilde dead_doubleacute

This will enable all of the above behaviors, this might not work with your keyboard because my layout is pc105 with funky IBM keys but I guess it should work since all the keys modified are standard keys.

To make those lines useful you need to save them in a file and execute:

xmodmap my_file

I added that to my ~/.bashrc.

By the way, I'm also using Caps Lock as Compose key but I might end using only AltGr, I will try that later.