VOGONS


First post, by dezipaitor

User metadata
Rank Newbie
Rank
Newbie

Hi

Since I had several bad contacts with the Windows keys in a DOS game session, I decided to disable these keys when DosBox has input focus.
I know there are little programs out there to solve this problem, but it is hard to find them, and usually nobody can trust them.

The attachement contains a patch file and the whole file sdlmain.cpp from svn revision 3827 .

The code is only compiled for WIN32 (#ifdef), and by default it is inactive. It can be made active in two ways:
Using command line parameter: -disablespecialkeys OR in dosbox.conf file in the [sdl] section by adding the line disablespecialkeys=true
The Windows keys are disabled if DosBox has focus and are enabled if DosBox loses focus.

The configuration is called "special" because it may also be useful for other platforms.

Of course, the code is released under the (DosBox) GPL license.

I hope the code becomes official so everybody can get its advantage.

THX for your GREAT WORK!

EDIT:
Reuploaded attachement due to minor fix.

Last edited by dezipaitor on 2013-10-28, 19:28. Edited 1 time in total.

Reply 1 of 3, by Joey_sw

User metadata
Rank Oldbie
Rank
Oldbie

is that would disable the "Application/Menu" Key (the key which located the left of Right-Ctrl on standard layout post-win95-keyboard) ?
as I map that key to "Mod1" in dosbox to free the "Ctrl+" or "Alt+" key combination for the dos-program/games' usages.

-fffuuu

Reply 2 of 3, by dezipaitor

User metadata
Rank Newbie
Rank
Newbie

Yes, both windows keys between left and right control and alt keys are disabled. Alt+Tab is not disabled.