Numeric Keypad Enter Key Not Working on OSX

I recently ran into a strange issue where I was unable to use the numeric keypad “enter” key on my Apple Magic Keyboard. After cursing briefly and cleaning out the keyboard with some compressed air, I realized it was only an issue in BBEdit text editor. In most other programs, everything worked just fine (though I suspect this may also be an issue in TextWrangler).

The standard enter key typically acts as a “return” key, generating a newline “\n” as it is often represented.

BBEdit, TextWrangler, and some other programs may treat the numeric keypad enter key as an execute command, though when editing a file, there is nothing to execute unless you’re in a shell worksheet. When entering a search query or URL in Chrome, I was assured my numeric keypad enter key was not broken as both keys worked to execute my search or go to a URL.

The fix is quite easy, navigate to BBEdit or TextWrangler’s preferences and check the box “Enter key generates return“. This should put you back in business of generating newlines with both enter keys on your keyboard. Other editing programs will likely have similar preferences panes to adjust the enter key function.

BBEdit Keyboard Preferences Pane

If you don’t have any program preferences to adjust, your next best bet is remapping the enter key to return using karabiner. This will solve the issue for nearly any keyboard enter key. After getting the program all set up and allowing the driver in System Preferences-> Security & Privacy -> General as well as Privacy -> Input Monitoring , you will want to select your keyboard (Target Device) and enter the following key mapping.

map keypad_enter to return_or_enter

The key mapping should work immediately without any restart as long as the drivers have been properly enabled.

Happy Typing!

2 thoughts on “Numeric Keypad Enter Key Not Working on OSX”

  1. Thanks for this!

    Had the same problem with my standard ANSI US Keyboard and was mildly frustrating having to use the keyboard in a slightly different way just for BBEdit. Was surprised that this is the default behaviour.

    Reply

Leave a Comment