How To Lock & Unlock Keyboard On Macbook?

Whether you want to clean your keyboard or don’t want anyone to use your MacBook after you leave it idle for some time, you would like to have a way to lock and unlock the keyboard on your MacBook Air/Pro whenever you want.

Unlike Windows laptops or PCs, Macs lack an inbuilt shortcut to lock or unlock the keyboard on your laptop.

In spite of this, the solution is surprisingly simple.

Which we are going to discuss in this article. Using these methods, you can lock & unlock your keyboard on MacBook Air/Pro or other PCs using macOS based on your requirement.

Having said that, let’s begin.

How to Lock and Unlock Keyboard on Mac

Even though Mac lacks an inbuilt feature to lock and unlock the keyboard, there are however 2 different ways that can allow you to lock and unlock macs keyboard whenever you like.

The ways are as follows:

1. By Using Third Party Applications

Third-party applications such as Karabiner Elements, KeyboardCleanTool, and Keyboard Locker can be used to lock and unlock the MacBook keyboard even when your screen is enabled and working.

For instance, Karabiner Elements is an open-source utility that allows you to accomplish your task in a few simple clicks. More interestingly, this app is supported for both Intel-based Macs and Apple Silicon Macs.

You can install it on your MacBook or other PCs without much hassle. For Karabiner Elements, I have provided a link to its official GitHub repository.

During the writing of this article, I personally tried KeyboardCleanTool and found it to be reliable. All you need is to download the .dmg file from their official website, install it, open the app and click on the lock the keyboard button.

how to lock keyboard on mac, how to lock mac keyboard, how to unlock keyboard on mac, how to unlock mac keyboard, lock macbook keyboard
Keyboardcleantool For Macos

Important Note:

Recently, many of these apps that were available to lock and unlock Mac keyboards stopped working after system updates. If I had to guess, Mac developers believe that locking and unlocking a keyboard at will constitutes a security bug, so they constantly update their code, making these programs useless.

2. By Using Screen Lock

Although using a third-party application is one of the most easiest ways for many people, but if you’re not comfortable using third-party programs, you can directly lock the keyboard by locking the entire screen.

Locking the screen is as simple as pressing Command + Option + Q. When you use this shortcut, the keyboard and screen are both locked immediately. In case you want to unlock the screen and keyboard, you can simply use the touch ID or enter your password.

Alternatively, you can use a timer to automatically lock your screen and keyboard while you’re away from your Macbook. In order to do that, you need to go to your System Preferences > Security & Privacy, and then select the Require Password option, and Select the timer as Immediately. This will automatically lock your keyboard and device immediately after it is locked.

how to lock keyboard on mac, how to lock mac keyboard, how to unlock keyboard on mac, how to unlock mac keyboard, lock macbook keyboard
Set Timer For Keyboard Lock

It is also necessary to enable Screen Saver in your MacBook so that auto-locking can work. To do this, click on Apple Logo > System Preferences > Desktop & Screen Saver & Enable Show screen saver option. You also need to select the time after which you what the system to show the screen saver.

how to lock keyboard on mac, how to lock mac keyboard, how to unlock keyboard on mac, how to unlock mac keyboard, lock macbook keyboard
Set Timer For Screen Saver

In this way, every time your screen is idle, it will automatically lock your keyboard so no one else can access it.

How to Unlock Your Keyboard on Mac: Troubleshooting

If, for some reason, your keyboard is not unlocking after it has been locked, then you should try the below procedure to unlock it.

Step 1: Hold the power button for 8-10 seconds in order to force shut down the Mac. After a few seconds, turn on your MacBook again.

Step 2: After restarting, enter your password to unlock your keyboard & mac.

Step 3: Once you are back, uninstall the application that you installed to lock your keyboard.

I hope you find the above steps helpful in unlocking your Macbook keyboard.


Is it possible to accidentally lock your keyboard on a Mac?

It is not possible to lock your keyboard by accident on a MacBook because there is no default feature to do this.

My keyboard isn’t working on my Mac. How do I restart it?

Even when your keyboard is locked away, you can forcefully shut down your MacBook by long pressing the Power key.


This is all about how to lock and unlock the keyboard on Macbook Air/Pro. I hope you enjoyed our article on how to lock & unlock the keyboard on MacBook.

Stay connected with us for more tips and tricks.

Leave a Comment