Heres the steps to change the behaviour of the Macbook Pro keyboard via the hid_apple kernel module.
- Check if the kernel module is loaded and then the supported parameters :
lsmod | grep -i apple # Make sure hid_apple is loaded
modinfo -p hid_apple
- Open
/etc/modprobe.d/hid_apple.confwith your favorite editor e.g nano, vim and insert the following:
# Fn when pressed down F1-12 by default,swap FN and Left Ctrl, swap Option/Command
options hid_apple fnmode=2 swap_fn_leftctrl=1 swap_opt_cmd=1
- Regenerate the initramfs and reboot:
sudo dracut -f
sudo reboot
Rollback:
sudo rm /etc/modprobe.d/hid_apple.conf
sudo dracut -f
sudo reboot