2

Is there a keyboard shortcut, or a way to create one, which does the equivalent of clicking the locked lock icon in the bottom left corner of locked System Preferences panes (which brings up the authentication dialogue)?

system preferences pane lock icon

1

While there is no explicit keypress that will take you directly to the Lock icon that I know of, you can hit the Tab key repeatedly to select the tabs and checkboxes in a System Preferences window (I tested with the Security & Privacy window) and end up at the Lock icon, which is then selected.

Not selected:

enter image description here

Selected:

enter image description here

Hit the Space bar, and the lock opens to the credentials login.

enter image description here

You will need to have System Preferences > Keyboard > Shortcuts > Full Keyboard Access > All controls radio button selected:

enter image description here

Thanks, Nimesh, for pointing out this radio button. I had it enabled, but did not realize it.

  • 1
    I wanted to suggest exactly this. I tried hitting the Tab key to land on the Lock icon (I have Full Keyboard Access enabled for all controls), but couldn't do so. The focus never reached the lock icon. – Nimesh Neema May 30 at 16:01
  • I find it completely strange that for a company that talks about accessibility as much as Apple does "Full Keyboard Access: All Controls" is still NOT the default. It defaults to "text boxes and lists only" which strikes me as very odd. – TJ Luoma May 31 at 14:03
  • Why do you think it is odd? The All controls setting is a superset of the expected actions the Tab key has in other areas of the macOS GUI, which is Text boxes and lists only. – IconDaemon May 31 at 14:29
1

You could do it using Keyboard Maestro. Sometimes these solutions are a bit janky, but this is simple enough that there shouldn't be issues, like having to add delays and such. Sometimes you have to add delays if you're using it to navigate a GUI and your computer is a bit slow. Like if you are going from one page to another you might have to wait for a bit before clicking, but since the assumption is that you're already looking at the correct window, all you have to do is simulate a click in the right location. A big hurdle with this solution is that if you don't already own it, keyboard maestro is pretty expensive... It has a trial though, so try before you buy.

You could do it with a simple automated mouse click. I made a gif to show that it works.

Important options:

  • If you want to restore the mouse location after the click, you can find restore mouse location in the corner menu of the action.
  • Make sure the click is relative to the front window's bottom left corner
  • You can use the get button to get the right location. When you click it, you have 5 seconds to activate the target window and hover over the target location.

So as long as the current window has the lock in the same bottom left corner, it'll get clicked.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .