Windows Key Unstopable?!
Ok, I hate the windows key with a vengence, and so do just about all the little llama gamers i know. Always bumping the stupid key in a game, etc. So i tried to use my working perfectly keyhooking app to stop that key, Normally to pass on a keypress i would return
however to stop a key from being pressed i simply return 1, and everything is ok. This approach works with every keypress i have tried, except for the windows and right-click keys. How can i interupt these keys? How can i end their reign of tyranny?! Thanks for your time.
return( CallNextHookEx(hhookHooks[KEYBOARDINDEX], nCode, wParam, lParam));
You can check out:
Scroll down to just below Figure 7, there is source (Fig. 8) for a program that does this, among other things.
You will need to implement the callback within a DLL, to do a systemwide hook like this -- perhaps that is your problem.
Yes, thanks for the fast reply, I already searched the board and found a thread about disabling ctrl alt del which used the code:
All that managed to do is hang the taskbar. It doesnt stop the windows key at all (im on 2k btw)
HWND hwnd = FindWindow("Shell_traywnd", NULL);
EnableWindow(hwnd, FALSE); // disable it
My huge global keyhooking app works for every single key, and it does see the keypresses for the windows key. I perform actions when the key is pressed, however windows still sees it first. This is driving me nuts! lol
It's really quite easy, actually.
Here's what you need:
1) A screwdriver
2) Pair of needle-nose pliers
No programming required!
If it werent 4am, i would have a witty reply to that. Ill edit my reply later to add it. Until then, just imagine a witty reply. Be afraid. Be very afraid.