Search code examples
c#swiftkeyboard-eventsmacos-sierra

Catch and change keyboard on mac sierra to emulate neo2 keyboard layout


I am using the optimised layout neo2: https://www.neo-layout.org/

Unfortunately the mac version was based on karabiner (https://pqrs.org/osx/karabiner/) which has stopped working since the Sierra update. There is a promising new Version called karabiner elements (https://github.com/tekezo/Karabiner-Elements) which will hopefully solve this problem.

Since i do not now when the fix will work on mac sierra, I am looking for a non generic "quick and dirty" solution, which just maps the standard german keyboard to the neo layout.

  1. Is it possible to catch keyboard events for mac systemwide?
  2. Which language/frameworks would i have to use to be able to achieve this workaround?

Solution

  • I would suggest using KeyBindingsEditor to create/edit your key bindings file, which should be located/created here: {your user folder}/Library/KeyBindings/DefaultKeyBinding.dict

    Note that your key bindings file must use UTF-8 encoding, and you must restart your computer after making modifications for them to take effect.

    Also, here is some more information about custom key bindings in macOS that you may find helpful.