On my Lenovo T420 I use this:
# Lenovo back/forward => PgUp/PgDown xmodmap -e 'keycode 166=Prior' 2>/dev/null xmodmap -e 'keycode 167=Next' 2>/dev/null to remap the Back and Forward keys (just above the Left and Right keys) from:
keycode 166 = XF86Back NoSymbol XF86Back keycode 167 = XF86Forward NoSymbol XF86Forward to PgUp and PgDn:
keycode 166 = Prior NoSymbol Prior keycode 167 = Next NoSymbol Next Unfortunately this configuration is reverted now and then (it happens at unpredictable times). I can also force the reverting back by briefly changing to a console outside X11 (e.g. by pressing CTRL-ALT-F2).
Is there a way I can force X11 to keep my remapping?