MacOS – keyboard shortcut for the System Preferences lock

keyboardmacossystem-prefs

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

Best Answer

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.