Tuesday, July 21, 2020 [Tweets] [Favorites]

Return and Enter Are Two Different Keys

John Gruber (tweet):

If your keyboard doesn’t have a dedicated Enter key, you can type the Enter key by pressing Fn-Return. That’s why some Return keys have “Enter” printed in small type above the word “Return”. If your keyboard has neither a dedicated Enter key nor an Fn modifier key, I don’t think you can type Enter.

Unfortunately, my experience is that fn-Return only works properly on Apple keyboards. On third-party ones, it just generates a Return. Similarly, the fn key is often implemented as a modifier within the keyboard, so that fn-Down Arrow will send an actual Page Down but pressing fn by itself does nothing. With an Apple keyboard, you can see on-screen that the fn and arrow keys were pressed, and you can use fn by itself to trigger Mission Control, Siri, or Dictation.

As a general rule, when they differ, Return is simply the key for typing a newline character (which, on classic Mac OS, was literally a return character, but let’s not get into that here), whereas Enter enters what you’ve already typed without adding a new line.

Previously:

8 Comments

In a dialog box that has both a multi-line edit field and a default OK button, Return should add a newline into the text field, while Enter should push the OK button. That's how it used to be in the good old times. Few developers still know about this and observe this, though, sadly.

“ All keyboards have a dedicated Return key — it’s the big key you’re thinking of above the right Shift key” says Gruber, ignoring the ocean of PC keyboards label that key “Enter”.

Don’t the two keys have different functions in the Finder? One opens a document/app and the other highlights the file name to rename it?

People look at the Fn key as if it is a modifier, like Shift or Control, but I think a more accurate way to look at the Fn key as if it is a toggle for two different physical keys to occupy the same key. So typically function keys and hardware media keys will occupy the same physical key, but be selected via the Fn-key. Same for arrow keys and page movement keys. Usually other keys (like letters and numbers) are unaffected by the Fn key.

In an ideal world, the Fn key would just be a modifier, with software keyboard mappings to decide on the behaviour, but that is not how it is implemented.

BTW: If you have Keyboard Maestro and a keyboard without an Enter key, you can use the Type a Keystroke action and select Enter from the popup menu to simulate it.

In many apps you can type the Enter key by pressing Option-Return.

@Lee - Nope, never been that way AFAIR.

But it might be an interesting project to list all the apps and places where Enter and Return have different behavior / meaning on macOS.

@Lee I don’t think Return has ever opened items in Finder, although there have been other apps that supported that while using Enter for renaming.

@Thomas In OmniFocus/OmniOutliner, Return creates a new item and Enter brings the current one into editing mode.

@Rob
I totally get Mr Gruber is hyper focused on the Apple side of computing, so I understood his return/enter analysis, but I also noticed, as you did, his myopic view of technology is still often head scratching. Many of my keyboards, being "PCs" have Enter, not Return on the key directly above the right Shift key.

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment