Instructables
video How To Lock Windows With A Key
.
A Very Simple Way On How To Lock Then Unlock Windows 7 or 8 With A Key.

Lock and unlock all versions of  windows with a key switch and an Arduino Leonardo Board.
-You will need a ON/OFF key switch that allows the key to be removed in both positions
-Arduino Leonardo

(The Leonardo Board differs from other Arduino boards in that it uses a single microcontroller to run your sketches and for USB communication with the computer. The Uno and other boards use separate microcontrollers for these two functions, meaning that the USB connection to the computer remains established regardless of the state of the main microcontroller. By combining these two functions onto a single processor, the Leonardo allows for more flexibility in its communication with the computer. It also helps to lower the cost of the board by removing the need for an additional processor.)

-Green LED
-Red LED
-2 x 220,ohm resistors

Switching the key locks your computer and indicates a red LED, switching back will unlock your computer and indicate a green LED.  This also works if your account is passworded.To add your password follow the instructions in the sketch.

Very little Arduino knowledge is needed to make this. This is my first project. It really is very easy.

The breadboard diagram can be viewed here: http://goo.gl/ISOSGZ

The sketch can be downloaded from here: http://goo.gl/ggmkRU

Hope you have fun with this, if you use it or like this instructable please vote and favourite it. Thank you.
eric squat5 months ago
Awesome.
Thomas_Kirkup (author)  eric squat5 months ago

Thank you eric squat

amidar4 months ago

Pardon, it is possible ! And it is not a simple as doing it with Leonardo but just look at this wonderful explanation how to do that, and much more :

http://hunt.net.nz/users/darran/

Actually this is the link to the "right thing": http://hunt.net.nz/users/darran/weblog/b3029/Ardui...

amidar amidar4 months ago

Tried to respond to specific post but obviously clicked at wrong reply button. :-) It is possible to do exactly this with Arduino Uno. Darran created ready to deploy exampes so, just try them. They worked just fine for me.

fjácome14 months ago

Is it possible with Arduino UNO?

Thomas_Kirkup (author)  fjácome14 months ago

It's sadly not. Taken from the Arduino website as its the best explanation - "The Leonardo Board differs from other Arduino boards in that it uses a single microcontroller to run your sketches and for USB communication with the computer. The Uno and other boards use separate microcontrollers for these two functions, meaning that the USB connection to the computer remains established regardless of the state of the main microcontroller. By combining these two functions onto a single processor, the Leonardo allows for more flexibility in its communication with the computer. It also helps to lower the cost of the board by removing the need for an additional processor."

Tks Thomas.