How can I use function keys in Macbook Pro?

I installed Debian Jessie on Macbook Pro. Most of the parts working properly. But when I press F1 or F2 key lcd brightness decreased or increased. If I used with while pressing fn key, functions keys works as expected.

Is there a way to change this behaviour to make functions keys works normally?

Yes, you can change this behaviour with giving correct option to kernel module hid_apple. It has a parameter named fnmode which can accept following values:

0 : disable fn key completely
1: use function keys last (with pressing fn)
2: use function keys first

So, using fnmode=2 when loading hid_apple module is what you want.

You can make this setting permanent with creating a modprobe rule in a file for example: /etc/modprobe.d/hid_apple.conf like this:

options hid_apple fnmode=2
1 Like