Questions

How to lock a Mac with one button

Download InputConfig on the Mac App StoreInputConfig is completely free on the Mac App Store. You don't have to make an account, there are no subscriptions, and nothing is locked. Optimized for Apple silicon.

The Mac already locks with Control Command Q. If you want that on a single button, give any input the Lock Screen system function in InputConfig: a controller button, a mouse side button, a MIDI pad, a foot pedal or a spare key such as F13.

I make InputConfig, a free Mac app. Start with what macOS offers, because for many people that is enough.

Steps

  1. Try Control Command Q first. It locks the screen at once.
  2. For one button, open a preset in InputConfig and click Edit.
  3. Add a row, press Scan and press the button or key.
  4. Set the output type to System Function and pick Lock Screen.
  5. Click Save, then Activate.

Use what macOS already has

  • The shortcut. Control Command Q locks the screen.
  • The Apple menu. Lock Screen is in the Apple menu.
  • A hot corner. In System Settings, Desktop & Dock, Hot Corners, set a corner to Lock Screen.
  • Touch ID. Pressing the Touch ID button locks a Mac that has one.

Put Lock Screen on any button

  • You: Add a row, press Scan and press the control you want. Set the output type to System Function and pick Lock Screen.
  • InputConfig: Locks the screen when that control is pressed, in any app.
  • Check: Press it. The login window appears.

Pick a control you will not press by accident, or put Lock Screen on a hold. In the row's Options, a different action when held means a quick tap does one thing and a longer hold locks the Mac.

Good places for it

A foot pedal locks the Mac as you stand up. A spare mouse button does it without reaching for the keyboard. On a controller, a hold on a button you rarely use keeps it safe from stray presses.

What it cannot do

InputConfig locks the Mac. It does not unlock it. At the login window you still need your password, Touch ID or an Apple Watch. The preset must be running for the button to work, so a Mac that has just restarted needs InputConfig open first.

The short version

  • Built in. Control Command Q, the Apple menu, a hot corner or Touch ID.
  • One button. A System Function row with Lock Screen.

Put it on a hold if the button is easy to bump.

Questions

What is the shortcut to lock a Mac?

Control Command Q locks the screen at once. Lock Screen is also in the Apple menu.

Can I lock my Mac with a mouse button?

Yes. In InputConfig, bind a mouse side button to the Lock Screen system function. A hold is safer than a tap, so the Mac does not lock on a stray click.

Can a button unlock the Mac too?

No. InputConfig can lock the screen and cannot enter your password. Unlocking still needs the password, Touch ID or an Apple Watch.

Download InputConfig on the Mac App StoreCompletely free. You don't have to make an account, there are no subscriptions, and nothing is locked. Optimized for Apple silicon. Open source on GitHub.

Updated