1

On Ubuntu 18.04 and 20.04 I fixed this issue with simply

setxkbmap -option apple:badmap

This option doesn't work on Ubuntu 22.04.

Anybody solved this?

  • setxkbmap only works with xorg, not Wayland, and 22.04 uses Wayland by default. You can try gnome-tweak-tools though, and see if keyboard tweak you need is listed there. Or you can modify the keyboard mapping files manually, or you can switch to xorg. – Esther Aug 01 '22 at 16:10
  • Thank you for hints. gnome-tweak-tools used to have "Gnome Tweak Tool/Typing/Miscellaneous compatibility options/Apple Aluminium Keyboard: emulate PC (Print, Scroll Lock Pause, Num Lock)" in previous versions. Latest version installed is "42~beta-1ubuntu1" which doesn't have this. – Dušan Panić Aug 02 '22 at 10:31

1 Answers1

0

I had the exact same problem and found a solution after much research:

  1. Go to Ubuntu Software.

  2. Install Input Remapper app.

  3. Open the app.

  4. On Device select your keyboard.

  5. Click on New entry.

  6. Click on Change Key (make sure it now shows Press key).

  7. On your keyboard, press the key you want to replace (in my case "<" key).

  8. Under Change Key button, write the name of key to replace with (in my case "less").

  9. Click on New entry.

  10. Click on Change Key (make sure it now shows Press key).

  11. On your keyboard, press the key you want to replace (in my case "º" key).

  12. Under Change Key button, write the name of key to replace with (in my case "masculine").

  13. On Rename write a name for the preset and click on the green arrow.

  14. Click on Apply.

  15. Important! Click on Autoload.

  16. Enjoy!

Input Remapper configuration

Carlos G
  • 21
  • 1
  • 3
  • 1
    Thank you for sharing this! Your solutions works. FYI I did code review. This is Python Daemon which hooks to file descriptor listens to keystrokes and replaces them in place. So basically your keyboard is relying on one Python process, which has multithreading but with GIL (global instance lock), although code is written using asyncio. I will search for more advanced solution. Something like this but as eBPF :-) P.S. Thank you soo much for this! – Dušan Panić Dec 15 '22 at 18:39
  • You're welcome! For me, as long as it works, it's OK :) – Carlos G Dec 17 '22 at 12:29