Shortcut for Locking Your Computer (Windows & Mac)

How-to basics · Updated November 23, 2026

The fastest shortcut to lock your computer is Windows Key + L on Windows and Control + Command + Q on a Mac. On Windows, this instantly returns you to the lock screen; on macOS, it locks the screen immediately (or shows the screen saver if you have one enabled). These shortcuts work in virtually every version of Windows since Vista and on all modern Macs.

Why Locking Matters

Locking your computer is a basic but critical security habit. It prevents anyone from seeing your open files, emails, or messages when you step away. It also stops someone from making changes to your system or accessing accounts that are already signed in. In workplaces, leaving an unlocked PC is often a policy violation; in public places, it can lead to identity theft or data loss. The lock screen itself doesn’t log you out—it just hides your session behind a password, PIN, or biometric prompt. This means your apps and documents stay open, but no one else can interact with them without your credentials.

Windows Keyboard Shortcuts

On Windows, the primary shortcut is Windows Key + L. Pressing both at the same time locks the workstation immediately. There is no confirmation dialog, and it works even if you’re in the middle of a full-screen game or a presentation. If your keyboard lacks a Windows key (rare, but possible on some third-party boards), you can use Ctrl + Alt + Delete and then choose “Lock” from the screen that appears. That method is slightly slower but works on every version of Windows. For touch devices, you can also swipe down from the top of the screen and tap the lock icon, but the keyboard shortcut is faster.

Mac Keyboard Shortcuts

On macOS, the default shortcut is Control + Command + Q. This locks the screen immediately. If you have a Mac with a Touch Bar, you can also press Control + Shift + Power to put the display to sleep, which effectively locks the screen if you have “Require password after sleep” enabled in System Settings. Another option is to set a hot corner: go to System Settings > Desktop & Dock > Hot Corners, choose a corner, and select “Lock Screen.” Then moving your mouse to that corner locks the Mac. Many users prefer this because it doesn’t require keyboard access.

How to Change or Disable the Shortcut

On Windows, you cannot remap the Windows Key + L shortcut through the built-in settings. It’s hardwired into the operating system. However, you can use third-party tools like AutoHotkey to reassign it, but that’s not recommended for most users because it can interfere with system functions. On a Mac, you can change the lock shortcut by going to System Settings > Keyboard > Keyboard Shortcuts > App Shortcuts and adding a new shortcut for the “Lock Screen” command. But be careful: overriding system shortcuts can cause conflicts. The default shortcuts are designed to be simple and memorable, so most people just stick with them.

What About the Lock Screen vs. Sleep?

Locking and sleeping are related but different. Locking keeps the computer running but hides your session. Sleeping puts the computer into a low-power state, which also locks it if you have password protection enabled. On Windows, you can set your PC to lock automatically after a period of inactivity by going to Settings > Accounts > Sign-in options and enabling “If you’ve been away, when should Windows require you to sign in again?” On a Mac, go to System Settings > Lock Screen and set “Require password after screen saver begins or display is turned off.” Many people confuse the two, but the shortcut for locking is instant, while sleep is a power-saving feature that also locks if configured.

Common Problems and Fixes

Sometimes the shortcut doesn’t work. On Windows, if Windows Key + L does nothing, check if your keyboard has a Fn lock or a gaming mode that disables the Windows key. Also, if you’re using Remote Desktop, the shortcut locks your local machine, not the remote one—use Ctrl + Alt + End on the remote session instead. On a Mac, if Control + Command + Q doesn’t lock, go to System Settings > Keyboard > Keyboard Shortcuts > Mission Control and see if the shortcut is listed; if not, it may be disabled by a third-party app. Another issue is that on some older Macs, the shortcut puts the display to sleep rather than locking—in that case, enable the password requirement as described above.

Alternatives to Keyboard Shortcuts

If you don’t want to use the keyboard, there are other ways to lock your computer:

  • Windows: Press Ctrl + Alt + Delete and click “Lock.” You can also set up a dynamic lock: pair your phone via Bluetooth and enable “Automatically lock when I leave” in Settings > Accounts > Sign-in options.
  • Mac: Use the Apple menu (top-left) and select “Lock Screen.” Or use a hot corner as mentioned earlier.
  • Third-party tools: Tools like LockMyPC (Windows) or Lockey (Mac) offer customizable shortcuts, but they’re not necessary for most users.

Frequently Asked Questions

Q: Does locking my computer log me out of apps?
No. Locking only hides your session. Your apps, files, and processes continue running in the background. You’ll return to exactly where you left off after entering your password.

Q: Can I lock my computer with just the power button?
On Windows, you can configure the power button to lock the screen: go to Control Panel > Power Options > Choose what the power buttons do and set “When I press the power button” to “Lock.” On a Mac, the power button puts it to sleep, which locks if you have password required.

Q: Is there a shortcut to lock the screen on a Chromebook?
Yes, Chromebooks use Search + L (the magnifying glass key) to lock the screen. You can also press Ctrl + Shift + Q twice to sign out, but that’s more drastic.

Q: What if I forget my password after locking?
If you forget your Windows password, you’ll need to use a password reset disk or your Microsoft account recovery options. On a Mac, you can use your Apple ID to reset the password at the login screen. It’s best to set up recovery options in advance.

Q: Does locking prevent someone from rebooting my computer?
No. A determined person can force a reboot by holding the power button. Locking only prevents casual access; for stronger protection, use full-disk encryption like BitLocker (Windows) or FileVault (Mac).

Quick Comparison: Windows vs. Mac

Action Windows Mac
Lock screen shortcut Windows + L Control + Command + Q
Alternative shortcut Ctrl + Alt + Delete → Lock Control + Shift + Power (sleep)
Menu method Start → user icon → Lock Apple menu → Lock Screen
Automatic lock Settings > Accounts > Sign-in options System Settings > Lock Screen

Remember, locking is a habit that takes seconds. Use the shortcut every time you step away, even for a moment. It’s the simplest defense against unauthorized access.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.