Hacker News new | past | comments | ask | show | jobs | submit login

I started using macOS with Big Sur (still on it) and I don't understand why Apple would remove the ability to select buttons in dialog windows with the keyboard. I've googled it and it seems you used to be able to do that on macOS, but when I follow the instructions on Big Sur, I can't move the selection from the button active by default to the other one (e.g. "Ok" vs "Cancel"). That means my right hand is making runs between keyboard and mouse all the time. Very unergonomic.



There’s an option in Keyboard settings > Shortcuts > “Use keyboard navigation to move focus…”. There are a couple security based dialogs it don’t work in but the majority of things it does work for me.


As others have said "use keyboard for navigation" works, but also you can generally press any button with the shortcut cmd-first-letter-of-button-text. E.G., if the dialog is "delete" and "cancel" and cancel is the default, cmd-D should press "delete". "replace" and "cancel", cmd-R should press "replace". Etc


The enter key activates the blue (default) button, the spacebar activates the one with the focus ring around it. You can move the focus ring with tab.


Experiment:

1. Open TextEdit.app

2. Type some random characters.

3. Attempt to quit with Cmd+Q.

4. A dialog box shows up, prompting you to save the file. Hitting Tab just cycles between the "Save As" and "Tags" text fields. There is no way for me to select the "Delete" button with Tab.

Challenge: quit TextEdit.app in that situation with they keyboard, without using the mouse, and without saving a file.

That's a broader topic btw: Apple's apps often make the Tab button only cycle between text fields. In Safari when logging into Spotify I can't reach the "Remember me" checkbox with Tab. It only cycles between the login and password textfields and the URL bar. Luckily, other browsers don't have this flaw.


I believe this is possible if you turn on "Use keyboard navigation to move focus between controls" in System Preferences -> Keyboard -> Shortcuts. I have no idea why this isn't on by default.


That works, thanks! Although there is a weird bug that going forward with Tab cycles through everything and goes back to the first field, whereas going back with Shift+Tab stops at the first field.


Thanks for this. I thought I was losing my mind having to grab my mouse every time I tried to quit a text editor and not save.


CMD-Delete almost always serves to press the Delete button or the equivalent in those dialogs. Not sure how you're supposed to find that out though!


> CMD-Delete

This^. It used to be command-D for "Delete/Don't Save" but at some point they changed it to command-delete; maybe someone thought it made more sense and was harder to type by accident?

    <Delete> command-delete (backspace, not forward delete)
    <Cancel> esc
    <Save/Default> return/enter
I actually prefer command-D precisely because it is easier to type: on the home row and you can type it with your left hand while mousing with the right.


TIL. Thanks!


For “Delete” specifically you can also simply press ⌘backspace when the save dialog is activated to trigger the button. In some dialogs where the button is “Don’t Save” (i.e. autosave not active) the combo may be ⌘D


I just press space instead of enter. However:

Home: you can only cycle between de navlist on the left, and the top toolbar. The complete app does not respond to the keyboard, probably because they are not buttons, but clickable rects. There's this boilderplate menu "Format". cmd-nr nav behaves weird.

Reminders: you can only cycle between de navlist on the left, and the top toolbar. The complete app does not respond to the keyboard, probably because they are not buttons, but clickable rects.

Stocks: you can only cycle between de navlist on the left, and the top toolbar, and it get towards some articles, but it simply doesn't work properly. Arrows have weird behavior, can't nav to "more data". But this is a lot better than the previous two.

Everything feels just like some one-person solo project recreating the OSX experience, but only focusses on how things look.


Hitting space in the example I gave would actually be pretty useless, since it would just put a space in the textfield.


Cmd+the first letter of the button works.


Doesn't work for me, probably because my system language is Russian. The button is "Удалить" but neither Cmd+D nor Cmd+У work, regardless of the current keyboard layout.


Does it work in TextEdit?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: