We help IT Professionals succeed at work.

disable keyboard

DuriPro used Ask the Experts™
I use my laptop in a laptop holder with an external USB-keyboard. I sometimes lay my agenda on the laptop keyboard since that is not in use, but pressing the agenda (or other papers) will of course activate the keyboard with types characters I don't want.

I'm looking for a solution to disable my integrated laptop keyboard, and that keyboard only.

Is there a program available or does anyone know how to program that myself in Delphi ?

Arthur Habraken
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2013
you can disable it from device manager
you can also make a macro ffor disabling, and one for enabling it back


I think it is not possible, at least not on my laptop. There is not something like a enable/disable option

The macro sounds interesting, but can you tell me how to do that ?

a simple way to disable the laptop keyboard is to go to the device manager, go to update driver then install an incompatible keyboard driver instead of the standard driver then reboot. You will see that after reboot your laptop keyboard is no longer functioning thus solving the problem. Hope this helps.

I just tried this on my computer before sending it to you!
Top Expert 2013

if you right click the keyboard>properties what do you you get?
for the macro, you first must havbe a solution to apply


Clicking the properties of the keyboard I get the Standard PS/2 Keyboard Properties with 4 tabs : General, Driver, Details, Resources.

The driver-tab contains a disable-button but it is grayed out
yes sure, that must happen, but you must do the following
right click on keyboard, click update driver
select install from a list or specific location
then select don't search I will select the driver to install
remove the check from show compatible hardware
select something weired, I selected Philips USB Wireless Keyboard
then answer with yes
and reboot!
your keyboard is not working!


There must be a way to enable the 'disable'-button in thekeyboard properties, don't you think ?

you may use a third party software also, I searched the internet and found the following

it will lock every thing! I didn't tried it!
Top Expert 2013

sorry - i meaan tto ask if you right klick the keyboard in device manager, do you have these options :
- update drivers
- uninstall    <-------can't you just uninstall it?
- search for modified devices
- properties

try to;
RENAME from \windows\system32\drivers\kbdhid.sys TO \windows\system32\drivers\kbdhid.xxx
COPY from \windows\system32\drivers\kbdclass.sys TO  \windows\system32\drivers\kbdhid.sys

Restart computer.
Following code is used to disable mouse and keyboard events.
I'm not sure whether you USB keyboard would work after this or not.
atleast you can give try and can tailor it i guess so that works fine.

 procedure TForm1.Button1Click(Sender: TObject) ;
   function FuncAvail(dllName, funcName: string; var p: pointer): boolean;
     lib: THandle;
     result := false;
     p := nil;
     if LoadLibrary(PChar(dllName)) = 0 then exit;
     lib := GetModuleHandle(PChar(dllName)) ;
     if lib <> 0 then
      p := GetProcAddress(lib, PChar(funcName)) ;
      if p <> nil then Result := true;
     BlockInput : function(Block: BOOL): BOOL; stdcall;
    if FuncAvail('USER32.DLL', 'BlockInput', @BlockInput) then
     ShowMessage('Your Mouse and Keyboard will be blocked for 5 seconds!') ;
     BlockInput(true) ;
     Sleep(5000) ;
     BlockInput(false) ;
This question has been classified as abandoned and is being closed as part of the Cleanup Program.  See my comment at the end of the question for more details.