Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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
share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

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.

share|improve this answer
add comment

So far, it looks like it is a bug in Chrome. When I try to do the same thing in Safari, it works just fine. Here are the results of a simple test I did.

Definitions:

  • Custom keyboard: this is exactly the same as the normal keyboard. The only difference is that I used Ukelele to swap the ' and return keys.
  • Return key code: outputs the Javascript key code that shows up when the physical return key is depressed.
  • Likewise, Quote key code refers to the key code when the key with the ' symbol is depressed.

Results:

+----------+---------+-----------------+----------------+
| Keyboard | Browser | Return key code | Quote key code |
+----------+---------+-----------------+----------------+
| Normal   | Chrome  |              13 |            222 |
| Normal   | Safari  |              13 |            222 |
| Custom   | Chrome  |             222 |            222 |
| Custom   | Safari  |             222 |             13 |
+----------+---------+-----------------+----------------+

Notice how Chrome and Safari's behaviors differ. Since the ' has been changed to return, Chrome should be sending 13 instead of 222 when that key is depressed.

share|improve this answer
    
Please report the bug at new.crbug.com and link back to it here, so that it can be fixed! Thanks. –  Mathias Bynens Mar 30 '12 at 5:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.