9

Some keys in my keyboard came to a sticky end after a catastrophic coke spill. I do not intend to replace the old keyboard, since the whole laptop will be replaced next year.

The keys in question are: arrow up, arrow down, shift and '/'.

Shift has a twin brother on the west coast, who's doing all the work now, and I could rewire '/' as 'delete' (now I realize this was a totally useless key) with the xmodmap -e 'keycode 119=/' command. That is, pressing 'delete' outputs a '/' now.

To discover how to replace the keys I use xev. I intend to replace arrow-up and arrow-down for pgup and pgdn respectively. Unhappily arrow-up/down do not have output. I know that pgup and pgdn are keycodes 112 and keycodes 117. But what should I fill in in the xmodmap -e 'keycode <value>=<action>' pattern asxmodmap -e 'keycode 112=' and xmodmap -e 'keycode 117='

2
  • Assuming you are talking about the keyboard of the laptop itself, a quick and simple solution till the replacement of your laptop could be a cheap USB keyboard. Commented Dec 27, 2018 at 8:42
  • While Stephen Kitt's will work, if there is any way you can, I suggest fixing, replacing, or circumventing (USB keyboard) the keyboard. The $50 saved is not worth the effort of retraining your self to type incorrectly, then to have to re-train yourself to type properly again. Commented Dec 27, 2018 at 10:23

1 Answer 1

12

See /usr/include/X11/keysymdef.h for the available key names:

xmodmap -e 'keycode 112=Up' xmodmap -e 'keycode 117=Down' 

(the prefixes need to be removed).

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.