Skip to content

Allows to swap the Fn key and left Control key on Macbook Pro and Apple keyboards in GNU/Linux

License

Notifications You must be signed in to change notification settings

sami-mw/hid-apple-patched

 
 

Repository files navigation

A patched hid-apple kernel module


The instructions of build, check, install will be posted a bit later.

UPDATE Oct 2015: The patch was modified for kernel 4.2 and support of Macbook Pro 2015. Thanks to @Aetf!

About

A patched version of hid-apple allows GNU/Linux user to swap the FN and left Control keys on Macbook Pro, external Apple keyboards and probably other Apple devices.

The patch was created by free5lot under GPL 2 (or later) licence. I hope it'll go to upstream kernel, so more GNU/Linux users could make their keyboards more comfortable for them.

This project was inspired by a similar patch made by JanmanX (Jan Meznik). His patch has the same idea but a bit different realization. I'd like to thank him for solving this problem in the first place and making his solution public.

Problem

This patch was created because Apple keyboards on Macbook Pro and external keyboard models have an awful location of special keys. To make it more habitual and friendly the fn key and left Control key should be swapped.

The swapping of Alt (Option) and Command is already possible without a patch by setting swap_opt_cmd=1 option to hid-apple kernel module in current versions of Linux kernel. More information is available at Ubuntu's help website.

Installation (simple way)

TODO

Installation (GNU/Linux-way with makefile)

To build make sure you have the kernel development packages for your distribution installed. If your kernel header directory is different from the default one in the Makefile export the correct one:

export KERNEL_HEADER_DIR=/path/to/kernel/header/dir

To build:

make

To install:

make install

The install will put the module in the 'extra' sub-directory and the default unpatched module will take priority. To give your newly built module priority create a file '/etc/depmod.d/hid-apple.conf' and add the following line:

override hid_apple * extra

Then run:

sudo depmod -a

Topicality

A lot of GNU/Linux users of Macbook Pro and/or external (wireless) keyboards face the problem of uncomfortable placement of keys. Here are some topics about swap of fn and left control keys, and all of them are checked unsolved or/and closed.

So this patch is probably essential and desirable by users.

About

Allows to swap the Fn key and left Control key on Macbook Pro and Apple keyboards in GNU/Linux

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 89.5%
  • Shell 10.1%
  • Makefile 0.4%