MacOS – How to rebind the return key so that it works consistently across all applications

keyboardmacosukelele

I tried rebinding my keyboard with Ukelele to switch the return key with the ' key. This works fine most of the time. There are just a few websites (that I've found so far) that aren't compatible with this change:

  • Facebook: Sending IM messages no longer works.
  • Google Docs: Does not allow you to insert new lines when editing word documents.
  • StackExchange: Pressing shift+return at the end of a bullet list does not insert a new bullet.

How can I get this rebinding to work flawlessly everywhere in the operating system?

I'm using Chrome 18.0 beta.

These are the applications I've found which don't recognize the return key after rebinding it:

  • Chrome
  • Microsoft Word (specifically when a dialog is open and the OK button is the default button. Pressing return should be the same thing as clicking the OK button).
  • Java apps

Best Answer

You probably need to step a level further down the tree of software and hardware, to the level of KyRemap4MacBook - which acts as a filter between the physical keyboard and the keyboard events reported to MacOS.

The software keyboard map is an optional thing - software can intercept keyboard events at a level that bypasses it, if they wish, and it sounds like some of what the browser does with key binding is touching on that.

A lower level remapping may bypass that problem.