My Thinkpad R500 has back/forward keys just about the direction keys, so on Firefox I keep losing entered text, accidentally.
How to disable these back/forward keys?
Excerpt from xev:
KeyPress event, serial 29, synthetic NO, window 0x5e00001,
root 0xbc, subw 0x0, time 2375874, (1279,794), root:(1285,881),
state 0x10, keycode 166 (keysym 0x1008ff26, XF86Back), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 32, synthetic NO, window 0x5e00001,
root 0xbc, subw 0x0, time 2377115, (1279,794), root:(1285,881),
state 0x10, keycode 167 (keysym 0x1008ff27, XF86Forward), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
You can disable keys using the
xmodmap
command. For example, to disableXF86Back
, run the following command:This sets the keycode
166
(Which is the keycode forXF86Back
as you can see in thexev
output) to nothing, which means it is disabled. To re-enableXF86Back
:To disable both the Back and Forward keys automatically, create the file
.xmodmap
in your home folder and paste the following inside it: