#!/sbin/runscript # Distributed under the terms of the GNU General Public License v2 # Bind keys for different actions start() { ebegin "Starting MacBook keybindings" # Bind the F11 and F12 keys to act as mousebuttons :) echo 1 > /proc/sys/dev/mac_hid/mouse_button_emulation # Activate echo 87 > /proc/sys/dev/mac_hid/mouse_button2_keycode # F11 echo 88 > /proc/sys/dev/mac_hid/mouse_button3_keycode # F12 # Change the behavior of the FN key echo -n 0x02 > /sys/module/usbhid/parameters/pb_fnmode eend ${?} }