3

I'm on Windows 7 and I do C# programming.

At work I'm tired of having to lock my computer every time I get up, and then when I get back press control +alt + delete, then type in my whole password. It doesn't seem like much but when you have to do it a thousand times a day it gets pretty tedious. I'd like an easy way to disable people from using my computer without having to lock it.. basically I'd just like to launch an app which intercepts all the keyboard/mouse events and disables anything from happening so the screen seems 'frozen'. But I can unfreeze it if I detect, for example the right mouse button pressed 4x quickly. Nobody else would know to do that, but I would! That way I can keep my system (secure enough) and not be annoyed by having to type in my pw all the time.

Does anyone know how to do this?

I'm thinking maybe there's a winapi where I can catch the events (mouse move, click, keyboard click) and then mark the event as handled. Is that right?

Thanks!

3
  • 1
    There are ways to hook into keyboard/mouse events, but I imagine such a program would be a nightmare to write. You'd have to physically power down every time you had a bug! (Also, I don't think you can intercept certain control sequences (e.g. CTRL+ALT+DEL) so it might be moot anyway.)
    – dlev
    Commented Aug 11, 2011 at 17:32
  • 2
    Your company had better be OK with this. Where I work, you would probably be dismissed for bypassing security requirements.
    – djdanlib
    Commented Aug 11, 2011 at 18:17
  • 3
    Perhaps you should spend more time at the computer and less time wandering around the office ;-) Commented Aug 11, 2011 at 20:31

2 Answers 2

2

I understand you. I already did similar "Keyboard Hooks".

http://dotnet.mvps.org/vb/articles/keyboardhook/

http://www.codeproject.com/KB/cs/globalhook.aspx

But because of security I really recommend another way which is more simple and not time intensive. Just buy an fingerprint reader. In OS you setup: Log off after 5 minutes of no action on computer ... ask for login information when waking up from logoff.

Then you can leave your computer and after 5 minutes (or if you log off manually) you screen is locked with all Windows security. Then you can come back and just flip your finger over the reader and you're logged in immediately without typing a word on keyboard.

http://www.cryptoshop.com/index.php

http://www.dealextreme.com/p/portable-usb-personal-digital-fingerprint-biometric-reader-35828

Fingerprint reader

Regards

0
1

http://msdn.microsoft.com/en-us/library/ms644990%28v=vs.85%29.aspx

The keyword you need in your searches is 'hook'.

Not the answer you're looking for? Browse other questions tagged or ask your own question.