Wednesday, August 29, 2012

Pound sterling and Euro sign and Indian Rupee symbol on a UK keyboard

Well,
         I am in UK right now and I am going to be here for quite some time. One thing annoying about being in UK is UK keyboard. Especially once you have a habit of using a US keyboard. Thankfully, I have brought my ergonomic US keyboard with me over here. But then the trouble is what do you do if you want to type £ ? If you are a linux person like me, this is what you should do.

Create a file named .Xmodmap in your $HOME.
Put the followings in the file


add mod3        =       Mode_switch
keysym  Alt_R   =       Mode_switch
keycode 26 = E NoSymbol EuroSign cent
keycode 46 = L NoSymbol sterling cent
keycode 27 = R NoSymbol U20b9 NoSymbol

What it does is that it assigns ALT_R (Right Alt)+e to €, ALT_R+SHIFT+e to ¢, ALT_R+l to £, ALT_R+SHIFT+l to ¢ and ALT_R+r to ₹. For more details refer to 'man xmodmap'.

Now, either you logout and log back in or run

 xmodmap ~/.Xmodmap

and Voila!! You have pound sterling , euro, cent sign and Indian rupee symbols available at your finger tips!! Literally!!


No comments: