Tuesday, October 30, 2012

[SOLVED] Modifying keymaps

I had a problem with a keyboard: the period key wasn't working and it was a hardware problem. The period key is important! So what now? Realizing that there were a couple of keys that I almost never used, I thought that remapping one of those keys was a good idea.

Remapping can be accomplished using xmodmap command with the following syntax:

xmodmap -e "keysym KEYSYMNAME = KEYSYMNAME ..."

KEYSYMNAME is something like: period, delete, equal, a, b, c. When in doubt, the xev can be used to find the correct symbol's name.


In my case, I was trying to remap the Guillemet (« or ») key to the Period key, so that it would be used to produce a period and a colon. On a terminal window I ran this:

xmodmap -e "keysym guillemotleft = period colon"

The colon will be produced when using the Shift key.

One more thing, please take in consideration that I'm using a keyboard with Portuguese layout, so this solution might not make sense to you.


xmodmap(1) | manpage

No comments:

Post a Comment