-
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
Code:
return( CallNextHookEx(hhookHooks[KEYBOARDINDEX], nCode, wParam, lParam));
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.
-
You can check out:
http://msdn.microsoft.com/msdnmag/issues/02/09/CQA/
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:
Code:
HWND hwnd = FindWindow("Shell_traywnd", NULL);
EnableWindow(hwnd, FALSE); // disable it
All that managed to do is hang the taskbar. It doesnt stop the windows key at all (im on 2k btw)
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.