There is a great app called knock which lets you unlock your mac by tapping on your phone twice while in proximity.


Unfortunately in order for the app on your phone to unlock your mac, you must have locked your computer using their lock utility.

The 3 ways I normally lock my computer do not seem to work with the app.
- Alfred
- control + shift + eject
- Waiting for screen saver

Their utility must be interfaced with a mouse and can not be triggered from the keyboard as far as I can tell.

How could you write a script (applescript?) that would lock the computer using their interface?

knock to unlock interface

enter image description here

Alfred lock interface enter image description here

1 Answer 1


I sent a question to the support personel at knock, and they informed me that a script has already been written. The creator blogged about this just hours before this question was opened.


There is both an alfred workflow and an apple script to do this.

You must log in to answer this question.

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