Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There are times when I need to disable my keyboard for a while to avoid unnecessary keystrokes which are quite likely to happen, like we can disable touch-pad of most laptop then enable it again.

I was wondering if there is a tool for which provides the functionality the same functionality for keyboards for Windows XP SP2.

share|improve this question
I wonder what you could do or want to achieve...after disabling keyboard itself? – Misnomer Aug 5 '10 at 22:07
Seconded. Does your cat like to tapdance on your keyboard when you're not home or something? Just lock the machine! – Shinrai Aug 6 '10 at 14:36
no its more like reading documents / watching movies with a baby in the lap.... and yeah sometimes "Snowy" like to tap dance here – Junaid Saeed Aug 6 '10 at 16:31
Well that makes some more sense though. Still, I think the easiest solution would be 'push the keyboard back'. I hope you can figure this one out though, because I'm clueless. – Shinrai Aug 6 '10 at 20:55
up vote 2 down vote accepted

Yes, AutoIt can certainly do this. What do you need to trigger the on/off option? Do you only want to block the keyboard, or all types of input?

A simple example:

BlockInput(1) ;Disable all user input (mouse and keyboard)

Sleep(5000) ;sleep for 5 seconds

BlockInput(0) ;enable all user input (mouse and keyboard)

Or more complex, but probably more to what you are looking to do:

HotKeySet("d", "DoNothing") ;sets d key to function DoNothing
HotKeySet("{ESC}", "Terminate") ;sets ESC key to function Terminate

While 1 ;while loop to keep processor from maxing out

Func DoNothing() ;does nothing when d key is pressed


Func Terminate() ;exits out when ESC key is pressed
    Exit 0

In reference to the above, you will need to do a hotkey for every key you want to do nothing and just set it to the function DoNothing.

share|improve this answer

Perhaps a scripting tool like AutoIt or AutoHotkey can "eat" all keystrokes until a certain hotkey is pressed.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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