News for hackers. Stuff that matters.
Re:Apple’s Use of AppKit, Mac Catalyst and SwiftUI in macOS by yakubin on Friday August 19, 2022 @09:56PM (#32528304)
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.

Re:Apple’s Use of AppKit, Mac Catalyst and SwiftUI in macOS by Shank on Friday August 19, 2022 @09:59PM (#32528312)
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.
Re:Apple’s Use of AppKit, Mac Catalyst and SwiftUI in macOS by yakubin on Friday August 19, 2022 @10:10PM (#32528363)
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.
Re:Apple’s Use of AppKit, Mac Catalyst and SwiftUI in macOS by ykhan6 on Saturday August 20, 2022 @12:34AM (#32529110)
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.
Re:Apple’s Use of AppKit, Mac Catalyst and SwiftUI in macOS by cr__ on Friday August 19, 2022 @10:12PM (#32528371)
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!
Re:Apple’s Use of AppKit, Mac Catalyst and SwiftUI in macOS by musicale on Saturday August 20, 2022 @01:23AM (#32529353)
> 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.
Re:Apple’s Use of AppKit, Mac Catalyst and SwiftUI in macOS by yakubin on Friday August 19, 2022 @10:17PM (#32528391)
TIL. Thanks!
Re:Apple’s Use of AppKit, Mac Catalyst and SwiftUI in macOS by uranusjr on Saturday August 20, 2022 @12:43AM (#32529142)
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
Re:Apple’s Use of AppKit, Mac Catalyst and SwiftUI in macOS by jbverschoor on Saturday August 20, 2022 @01:58AM (#32529535)
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.

Re:Apple’s Use of AppKit, Mac Catalyst and SwiftUI in macOS by yakubin on Saturday August 20, 2022 @04:34AM (#32530395)
Hitting space in the example I gave would actually be pretty useless, since it would just put a space in the textfield.