-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 :)

New contributor
Konstantinos Marinis is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
2
  • It would seem obvious but use an external keyboard, assuming laptop. Or just change the keyboard if desktop. You could spend many days if not weeks trying to remap this key.
    – David
    Commented Jun 25 at 12:38
  • It would be good to have mentioned the type of keyboard or provide a picture. It may have been the case that replacing the key cap is easy, or even that replacing the keyboard is easy, depending on what type of keyboard it is. Commented Jun 26 at 0:52

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .