How can I use function keys in Macbook Pro?

You can also change the settings in runtime without unloading&loading hid_apple module with:

$ echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmode