0

I am on ubuntu 20.04 and I have attached a Logitech Keyboard with Macintosh Layout. Withing settings I was able to add this Layout and viewing it from the Settings yields that image:

German Macintosh layout

The Keyboard itself does exactly look like the one on the image, but two keys are swapped when pressing them.

These are: ^ and <. In other words »caret key and greater key« need to be remapped.

How can I do that?

UPDATE Following some tutorial on the web just ran those commands:

xmodmap -pk | grep -i greater
…
94      0x003c (less)   0x003e (greater) …
…

xmodmap -pk | grep -i less … 94 0x003c (less) 0x003e (greater) … …

xmodmap -pk | grep -i asciicircum … 15 0x0036 (6) … 0x005e (asciicircum) …

xmodmap -pk | grep -i degree 19 … 34 … 49 …

So, finding the key with the ^ is somewhat difficult

Update #2

  1. using xmodmap -pke makes it much easier to find the keys
  2. finally that fixed the issue:
xmodmap -e "keycode 94 = dead_circumflex degree dead_circumflex degree U2032 U2033 U2032 U2033 grave asciitilde"
xmodmap -e "keycode 49 = less greater less greater bar dead_belowmacron bar dead_belowmacron less greater bar dead_belowmacron"
philipp
  • 379

1 Answers1

0

So the command that solves the problem for me is that one:

xmodmap -e "keycode 94 = dead_circumflex degree dead_circumflex degree U2032 U2033 U2032 U2033 grave asciitilde"
xmodmap -e "keycode 49 = less greater less greater bar dead_belowmacron bar dead_belowmacron less greater bar dead_belowmacron"

I have put it in a script ~/swap-keys.sh and each time I am using the apple keyboard, I ran this and it works.

philipp
  • 379