Skip to content

Instantly share code, notes, and snippets.

@kazi331
Last active April 5, 2024 18:11
Show Gist options
  • Save kazi331/4065a50259c151580b53caab33f35bc0 to your computer and use it in GitHub Desktop.
Save kazi331/4065a50259c151580b53caab33f35bc0 to your computer and use it in GitHub Desktop.
Key remap on linux. How to remap keyboard keys on linux
keycode 117 = End
  1. First identify current keycodes by running xev in the terminal
  2. Create a file in the home directory with name .Xmodmap
  3. Inside of the file, remap the keycode with desired keyName

for me, I waant to replace Next key into End key.

110 Home - HOME
115 End - END
112 Prior - PAGEUP
117 Next - PAGEDOWN

to do ths, I added keycode 117 = End which determines keycode 117 is now work as End key

  1. After typing desired keycode and name accordingly, save the file as .Xmodmap in home direcctory.
  2. then run the command xmodmap ~/.Xmodmap from terminal.

That's all. you are now all set

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment