Click here to Skip to main content
15,030,240 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I'm trying to create a program in C# that disable mouse and keyboard on my Windows 8 VM (I don't want to kill my own computer).

What I have tried:

I found some content on Internet that proposed to use register and use this to disable keyboard :

To disable: Add a new REG_BINARY value called "Scancode Map" to "HKEY_LOCAL_ MACHINE\System\CurrentControlSet\Control\Keyboard Layout" with a data value of "00000000000000000300000000005BE000005CE000000000". Unfortunetly it doesn't work :/

Does someone have any idea ? Thank you so much for helping me :)
Posted
Updated 24-Aug-18 16:50pm
Comments
Patrice T 24-Aug-18 22:06pm
   
Probably a bad udea.
Just curious the reason why? I can't see anything useful for it.

1 solution

Easily done with low level mouse and keyboard hooks. You just don't pass the mouse and keyboard messages up the hook chain.

Google: C# global keyboard hook[^]

Google: C# global mouse hook[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900