Disable Windows key & more

Started by
7 comments, last by HanSoL0 19 years, 10 months ago
I''m trying to capture the Windows key in my fullscreen app before Windows actually sees it and opens up the Start menu. Is there a quick solution to this (perhaps in the message loop?). Also, it''d be nice to also disable other key combinations like Alt-F4. Any help would be MUCH appreciated. Ryan Buhr Reactor Interactive, LLC. rbuhr@reactorinteractive.net

Ryan Buhr

Technical Lead | Sector 13

Reactor Interactive, LLC

Facebook | Twitter

Advertisement
I found a good dollop of glue under the windows key works a treat. However, disabling Alt-F4 might be trickier

I think these (or at least Alt-F4) is meant to be always available for security reasons (Basically an annoying program supposedly can''t hijack your machine and prevent you from switching out and killing it.)

It would be nice if the OS allowed users to specify what unblockable input actions users wanted, bcause that windows key is soo damned annoying.

Er, I just realised I''ve been very little help tho, sorry
Perhaps a message box displayed at the start of your program with the text: "Please place a good dollop of glue under the windows key" would suffice.
http://msdn.microsoft.com/

http://support.microsoft.com/default.aspx?scid=kb;en-us;216893
http://support.microsoft.com/default.aspx?scid=kb;en-us;125614
http://support.microsoft.com/default.aspx?scid=kb;en-us;226359

All these links were provided by simple searches from the first link.
quote:Original post by Krylloan
I found a good dollop of glue under the windows key works a treat.




quote:Original post by MaulingMonkey
http://msdn.microsoft.com/

http://support.microsoft.com/default.aspx?scid=kb;en-us;216893
http://support.microsoft.com/default.aspx?scid=kb;en-us;125614
http://support.microsoft.com/default.aspx?scid=kb;en-us;226359

All these links were provided by simple searches from the first link.


Yeah, I had found all those before, but I guess I''d rather interrupt the Windows key message programmatically without modifying the user''s registry each time.

Hmmm.....

Ryan Buhr
Reactor Interactive, LLC.
rbuhr@reactorinteractive.net

Ryan Buhr

Technical Lead | Sector 13

Reactor Interactive, LLC

Facebook | Twitter

quote:Original post by HanSoL0
I''m trying to capture the Windows key in my fullscreen app before Windows actually sees it and opens up the Start menu. Is there a quick solution to this (perhaps in the message loop?). Also, it''d be nice to also disable other key combinations like Alt-F4. Any help would be MUCH appreciated.

Ryan Buhr
<a href="http://www.reactorinteractive.net">Reactor Interactive, LLC.</a>
<a href="mailto:rbuhr@reactorinteractive.net">rbuhr@reactorinteractive.net</a>
It''s kind of bad behaviour for an application to do so. I suggest you handle WM_ACTIVATE when your application gets deactivated instead.

Programs that don''t let me use the keyboard the way I like to use the keyboard, which includes using the Windows key and other key combos, are very quickly uninstalled.
I have this vague memory (perhaps induced by overwork) of an obscure call in DirectX somewhere to disable the windows and menu keys. I could be hallucinating.

While most will agree that disabling [Alt][Tab], [Alt][F4] and the like is bad practice, there is little chance of a player with fast, but clumsy fingers will accidentally hit [Alt][Tab] in the middle of blasting his opponents and ruin his game.

Following the same logic, I would consider an option to disable the windows and menu keys a welcome (necessary) addition.
quote:Original post by DrNecessiter
(...) there is little chance of a player with fast, but clumsy fingers will accidentally hit [Alt][Tab] in the middle of blasting his opponents and ruin his game.


I''d follow the AP''s tip and just process the WM_ACTIVATE message. When you lose focus, just enter pause mode or your in-game menu or whatever. That way, the player''s opponents will still be there to be blasted into smithereens.
2 + 2 = 5 for extremely large values of 2

This topic is closed to new replies.

Advertisement