Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Buadhai

macrumors 65816
Original poster
Jan 15, 2018
1,138
440
Korat, Thailand
For as long as I can remember, most Mac apps have treated the Enter key the same as the Return key. (Text Edit treats them same, BBEdit does not.) For example, if I select a file in the Finder, both the Enter key and the Return key select and highlight the base file name (without the extension) so that you can edit it.

I'm pretty sure that this has been the behavior of Forklift for as long as I have been using it. But, recently I noticed that they behavior of the two keys is now different. The Return key (which is actually labeled "Enter" on my Logitech K120 keyboard and located just above the right Shift key) behaves the same as in the Finder, but the Enter key (to the right of the 3 key on the numeric keypad) does not.

I wrote to BinaryNights about this and received the following odd reply:

One of those keys is a return and the other one an Enter and now they are being treated as two different keys in ForkLift too. I know that this might cause inconvenience but currently the key on the numeric pad doesn't work the same as in Finder.

I understand that they made the change, but I can't figure out why.

Any ideas?
 
When I use ForkLift, the Return and Enter keys behave the same way - rename. This is on an Apple keyboard with numeric keypad.

My understanding is that macOS treats them as different keys, but it is up to each app to decide how to use them. This is generally true of all the keys on the full keyboard.

And there are numerous apps around which will intercept keystrokes and change them before passing to an app!!
 
When I use ForkLift, the Return and Enter keys behave the same way - rename. This is on an Apple keyboard with numeric keypad.
That's odd. I tested this with ForkLift on my wife's M1 iMac with a Magic Keyboard with Touch ID and Numeric Pad. The Return and Enter keys behave differently, just as on my old 2017 iMac with the Logitech keyboard.

Also, doesn't it seem like BinaryNights acknowledged this behavior when they wrote to me:

now they are being treated as two different keys in ForkLift too


My understanding is that macOS treats them as different keys, but it is up to each app to decide how to use them. This is generally true of all the keys on the full keyboard.
Yep, and now BinaryNights has chosen to treat them differently. I'd like to find out why as it is inconvenient for those of us who expect their behavior to be the same, as it is on most Mac apps. BBEdit treats them differently. TextEdit treats them the same.

And there are numerous apps around which will intercept keystrokes and change them before passing to an app!!
I'm a long time user of Karabiner-Elements. It was a simple matter to map what they call the "Keypad_Enter" key to "return_or_enter". That works across all apps, including ForkLift.

Except, now what do I do if I actually need an Enter key?

Note that Karabiner has the ability to make application specific changes. I couldn't figure out how to do that in this case. I'll keep working on it.
 
You haven't mention what the supposed new behaviour is for the Enter key.
I'm not sure what you're asking here. The keypad Enter key doesn't do anything in ForkLift, as far as I can see. I haven't fooled with it much to see if it does anything. What I know for certain is that it no longer lets you rename the selected file. It used to do that.
 
You do not have to be rude. I was just asking because you did only mention in your OP that it differed (which of course includes doing nothing, but this was not self-evident).
 
You do not have to be rude. I was just asking because you did only mention in your OP that it differed (which of course includes doing nothing, but this was not self-evident).
I didn't realize I was being rude. I apologize if you took it that way. I will rephrase.

I figured out how to create a Karabiner complex modification file that changes the keypad Enter key into a Return key only if ForkLift is the front-most application. Here it is:

Code:
{
    "type": "basic",
    "from": {
        "key_code": "keypad_enter",
             },
       "to": [
        {
            "key_code": "return_or_enter"
        }
    ],

    "conditions": [
        {
            "type": "frontmost_application_if",
            "bundle_identifiers": ["^com\\.binarynights\\.ForkLift-3$"]
        }
    ]
}

Anyone wanting to try this out ought to read up on the Karabiner configuration documentation before trying to use it. You can find it here: Karabiner Configuration Reference Manual
 
The change is indeed also mentioned in their update dialog:
 

Attachments

  • Photo.png
    Photo.png
    352.6 KB · Views: 82
It is possible to change the key binding for "Rename" in ForkLift's settings dialog from Return to Enter, but I haven't found a way to enter both keys for the same command (like some applications, for example IDEs, allow that).
 
The change is indeed also mentioned in their update dialog:
Yeah, I suppose I should have read that:

"The Enter on the numeric keyboard is treated as a separate key, it is now possible to use it in keyboard shortcuts. Enter and Return are treated as two different keys."

But I get their point about using it when composing keyboard shortcuts.

The problem is that a lot of us have spent years assuming that those two keys are essentially identical, the way they are in most Mac apps. In fact, Karabiner calls the default action of both of those keys: "return_or_enter"

If it were me, I'd make treating the keys separately as optional. Not everyone is going to go to the trouble to use something like Karabiner to go back to the behavior they expect.
 
Not to beat this to death, but I notice that BBEdit has a choice in the Keyboard preferences on how to treat the keypad Enter key:

screenshot 2022-06-27 at 08.49.05.jpg


If you leave that box unchecked, then the keypad Enter key does nothing. (At least as far as I can tell.)

ForkLift should have such a choice.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.