Game Development Community

Disabling the windows key?

by Aaron K Murray · in General Discussion · 11/11/2007 (5:34 pm) · 8 replies

Is it possible to disable the windows key while the game is running?

I've added the standard mappings but can't seem to trap the windows key...

function ConfigureControls() {
if(!sceneWindow2D.getUseObjectMouseEvents())
sceneWindow2D.setUseObjectMouseEvents(true);

//set up the controls
moveMap.bindCmd(keyboard, "cmd", "inputKeyboard();", "inputKeyboardStop();");
moveMap.bindCmd(keyboard, "opt", "inputKeyboard();", "inputKeyboardStop();");
moveMap.bindCmd(keyboard, "lopt", "inputKeyboard();", "inputKeyboardStop();");
moveMap.bindCmd(keyboard, "ropt", "inputKeyboard();", "inputKeyboardStop();");
moveMap.bindCmd(keyboard, "win_lwindow", "inputKeyboard();", "inputKeyboardStop();");
moveMap.bindCmd(keyboard, "win_rwindow", "inputKeyboard();", "inputKeyboardStop();");
moveMap.bindCmd(keyboard, "win_apps", "inputKeyboard();", "inputKeyboardStop();");
}

#1
11/11/2007 (5:45 pm)
The win keys are not available. See your documentation under TGB Glossary | Keyboard Keys for a listing of the keys you have available.
#2
11/11/2007 (5:52 pm)
Bummer.
#3
11/12/2007 (2:17 pm)
If you have the source you could disable it in the low level Windows Message handling.
#4
11/12/2007 (2:40 pm)
Unfortunately I don't. I wonder if it requires special code to handle the windows key. Doesn't seem to make sense to leave it out if it was just another code to look for.
#5
11/12/2007 (2:52 pm)
It could have something to do with the cross-platform nature of the engine. Perhaps supporting the distinct platform handler for the Windows key was not on the minds of the engine dev's. I don't know. I'm not sure about the particulars of keyboard codes anymore. I haven't thought about int 16h for a long, long time--so long that I doubt there was a "Windows key".

EDIT: typos
#6
11/12/2007 (2:54 pm)
Hrmm, well, we know that they support the special Mac keys. I'm just surprised this hasn't come up yet.
#7
11/12/2007 (3:02 pm)
Looking through the code, I see the references to the L/R Windows and Apps keys. Don't know why it's not parsing out, though. I didn't look deeper than seeing that the references were in winInput.cc.
#8
11/15/2007 (8:07 am)
David - is there a way to see if the references are working at all? I don't know what interrupt actually gets sent to the OS when a windows key is pressed. It might be special.