xps keys
Page Up Up Page Down
Left Down Right
I have a Dell XPS 13 7390 and the arrow keys are super close to the page up/down buttons. That makes it annoying when trying to use arrows when coding/typing. To resolve this I'm going to remove the page up/down keys and turn those into left and right (the arrow keys they are closest to).
Finding keycodes/actions
xev
will log the keycodes and actions for each key press in the terminal, for me these were:
Key | Keycode | Action |
---|---|---|
Right | 114 | Right |
Left | 113 | Left |
Page Down | 117 | Dont Care |
Page Up | 112 | Dont Care |
Changing Keys
-
I want to change Page Down (117) to Right (Action)
xmodmap -e "keycode 117 = Right"
-
I want to change Page Up (112) to Left (Action)
xmodmap -e "keycode 112 = Left"
Result
Left Up Right
Left Down Right
Startup
Create a startup script that makes the key mapping changes "permanent"
mkdir startup && cd startup/
touch keymap.sh
chmod +x keymap.sh
Add commands to script
xmodmap -e "keycode 117 = Right"
xmodmap -e "keycode 112 = Left"
Add script to startup by opening startup applications
- Name - Keymap
- Command - Browse to
~/startup/keymap.sh
- Comments - map pgup to left and pgdn to right
Restart or Logout/Login to test
Last update: September 30, 2020