01 paź

How to fix Magic Keyboard (w/o Numeric pad) to work correctly with Ubuntu 20.04 LTS

If you would like to enjoy typing your favourite keyboard on Ubuntu as well, you need to change mapping on keys like:

  1. Left Control to Left Win
  2. Left Win to Left Control
  3. Right Option to Right Command

First two steps we will achieve using gnome-tweak-tool (how to install, check here). If you have installed successfully, open it, go to Keyboard & Mouse section -> Additional layout options -> Ctrl postion and check as shown on the picture below:

The 3rd step doesn’t work for me while I set up it through tool above. But it is quite simple to use it by one-liner in /etc/rc.local. I had to created it manually and configure permissions to chmod 755

#!/bin/bash
# switch opt with command key
echo 1 | tee /sys/module/hid_apple/parameters/swap_opt_cmd

And that’s all, now you can use commands and diacritics like on your mac 🙂