Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

one of my keyboard keys is dead (< >) and I'd like to change the windows/super key behavior, so I can use it to type < and > .

is this possible? I'm on ubuntu 9.04 with gnome, I read some info about setxkbmap and xmodmap but I don't know where to start.


share|improve this question
up vote 1 down vote accepted

Dmatigs answer should already work. I just want to add that if you are having trouble finding the keycode you can either look into the keymap you are using in /usr/share/rdesktop/, or alternatively you should be able to use the keysym (the name X11 uses for that key, for example Super_L for left Windows key) instead of the keycode.

And you probably have to do something like xmodmap -e 'clear mod4' if you want to modify Super_L (since it is what X11 calls an 'modifier' key), and then add Super_R back again with xmodmap -e 'add mod4 = Super_R'.

xmodmap -e 'clear mod4'
xmodmap -e 'add mod4 = Super_R'
xmodmap -e 'keysym Super_L = less greater'

That's how I would try to do it. The two keysyms behind the equal in the last line are for normal key presses and shift+key respectivly. You can add up to 6 (possibly even more, but I am not sure) of these for all kinds of different modifier groups (alt, ctrl, ISO_Level3_Shift aka alt gr).

Lastly, place the commands (only the parts behind the -e, not the whole xmodmap call) in a file called .Xmodmap in your home directory, that will make X11 load up your configuration every time you start your desktop session.

share|improve this answer
rakete, Tried your method, but it seems the system gets confused with me using the Super_L to type a "normal" key. I can type "less", but only while pressing the ctrl key also; "greater" is impossible to type. using the last of your 3 suggested commands, but using Super_R it works fine - must get used to it... thank you! – user37675 May 22 '10 at 11:43

Open up a terminal and type


Now, press the relevant keys - firstly your super key, and then the > (I Don't know how your keyboard looks). In the output window you will see a bunch of gibberish, but pay attention for each key to the "Keycode " and write them down.

Then whip up another terminal and type

xmodmap -e 'keycode 1=2'

Where the first number is the keycode for your super key, and the second the keycode for the key you want it to act as.

share|improve this answer
You know...too late i realised if that key isn't working you cannot find the code for it in that way can you? Doh. Oh well I'll leave this here, might help somebody. – Dmatig May 19 '10 at 15:41
thanks for your reply :) – user37675 May 22 '10 at 11:39

You must log in to answer this question.