So if you’ve been using my macOS tip to append a text file using Automator and shell scripts, you’ve no doubt run into two frustrations: the window is not brought to front focus, allowing immediate typing, and the OK button isn’t accessible via the keyboard (typing Return only inserts a line break, attempting to Tab to the button just inserts a tab character in the text field).
The OK button is a simple keyboard shortcut: the Function key (fn) + the Return key.
I’ve updated the above post to include the simple AppleScript step in Automator that will bring the window to front-most focus.
2 thoughts on “How to Select the “OK” Button via Keyboard for Text Dialog Boxes (macOS)”