Zeljko's Blog

Apple Keyboard on Linux

Created: 2023-04-25
Last Modified: 2025-01-29

I am using an old Magic Keyboard with my ThinkPad on Linux. Out of the box it works great except one noticeable thing. Alt and Meta/Windows Keys are swapped. On the Apple keyboard they are called “Command” (Alt) and “Option” (Meta/Windows). And it is very annoying. You can not use this keyboard. But generally I like it and I think it is a great keyboard. But looking around on the Arch Linux Wiki I found out how to fix it. This article on the Arch Wiki describes very well how to make it behave like a “normal” keyboard. I ended up using an existing solution from the AUR, the Un-Apple-Keyboard package. Now I can continue using it without needing to buy a new keyboard. Someone might ask why I prefer an Apple Magic Keyboard over a ThinkPad keyboard. It is simple. Usually I put my ThinkPad or any other laptop on a laptop stand and connect it to keyboard, mouse and external display, otherwise I am using the builtin keyboard.