Mac OS X Remap Capslock to F12

Content

Install Seil (previously PCKeyboardHack) and check "Change the caps lock key". Enter keycode 111.

https://pqrs.org/osx/karabiner/seil.html.en