Score:0

Macintosh Keyboard — how to switch keys

tr flag

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"
uz flag
Jos
Run `xev` from a terminal. This will give you a new window. Place your mouse cursor in this window and press the ^ key.
tr flag
thanks! Now I now the key codes: 94 and 49
Gunnar Hjalmarsson avatar
uz flag
Does this answer your question? [Key '@' (Keycode 49) and key '<' (keycode 94) are inverted on macbookPro keyboard](https://askubuntu.com/questions/843590/key-keycode-49-and-key-keycode-94-are-inverted-on-macbookpro-keyboar)
tr flag
@GunnarHjalmarsson Well that solution looks pretty nice, gonna give it a shut.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.