Yes, you can change the xmodmap. First thing to do is find the keycode for the key you want to use as replacement. To do that, open a terminal, then run xev
in the terminal. Move the mouse pointer into the small white window that opens up, then hit the key on the keyboard that you want to use as replacement. In the terminal you should now see a KeyPress event and a KeyRelease event. Make a note of the keycode number it shows, then close the white xev window.
Now, if you don't already have a ~/.Xmodmap
file, create one with the current mapping by running
xmodmap -pke > ~/.Xmodmap
Then edit the file with your favorite editor. e.g. gedit ~/.Xmodmap
.
Scroll down to the line for the keycode you noted earlier. If the keycode you want to use is 62 for instance, change the line that starts with keycode 62 =
to read:
keycode 62 = Return NoSymbol Return
Next time you log in, you'll be asked if you want to load that modmap, so do that, and afterwards that key should work as a return key. For making the change in your current session, load the file with:
xmodmap ~/.Xmodmap
I have the Menu
key very close to the Ctrl and left-arrow keys.
xmodmap -e 'keycode 135 = 0x0000'
To get a first impression what keycodes are mapped to which keys, just type:
xmodmap -pke
which gives you a list of all mappings. For example, the line
keycode 57 = n N
means that the keycode 57 is mapped to a lowercase "n" if no extra key is pressed, and an uppercase "N" if Shift is held.
Some references to get around with things.
xev
will let you identify the keycode for your key of interest.
Look at its man page, This is a good quick reference too,
Mediakeys with .Xmodmap HOWTO
- ArchWiki has a good description for xmodmap
Best Answer
Press Fn+Esc will toggle between enabling/disabling Fn-key functions.
You can also press Ctrl+Shift+T.