How to Select the “OK” Button via Keyboard for Text Dialog Boxes (macOS)

Screen Shot 2018-09-03 at 4.48.58 PM

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.

Advertisement

2 thoughts on “How to Select the “OK” Button via Keyboard for Text Dialog Boxes (macOS)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s