-1

New Ubuntu user here

I recently broke the key 1 in my keyboard, above my letter keys. I tried to follow the below guide How can I remap keyboard keys? but I face the following issues

  1. The key is broken, meaning I cannot press it to catch the events via xev. (Note that this key has 2 functions, the number and the exlamation mark, using Shift. My main problem is the exclamation since for 1, I can use the numeric pad)

  2. I am thinking of changing the grave/tilde key, since they are next to the broken one, but I am not sure how usable they are (aside from home directory perhaps). The other option would be the Insert key. What would be my best options here?

  3. Even if I follow the guide, as far as I understand, the fix is temporary and I need to make permanent changes in this folder /usr/share/X11/xkb/symbols/pc. However this is not a valid folder in my setup (Ubuntu 24.04). How can I make this fix stay?

Thank you very much for the advice :)

1 Answers1

0

You can do it with xbindkeys and xdotool.

sudo apt-get install xbindkeys xdotool

Run xbindkeys -d and it will create the default ~/.xbindkeysrc

Add the following:

# Use Shift+F1 as Shift+1
"xdotool key shift+1"
  release+shift + f1

Then, run xbindkeys -p to poll the new setting.