Alt tab keybinding
by Eyal Erez · in Torque Game Builder · 06/04/2008 (11:46 am) · 1 replies
Does anyone know how to bindCmd "alt tab"?
this seems to work for alt F4. moveMap.bindCmd(keyboard, "alt F4" , "" , "pause();" );
but it doesn't work for alt tab. moveMap.bindCmd(keyboard, "alt tab" , "" , "pause();" );
neither this moveMap.bindCmd(keyboard, "tab alt" , "" , "pause();" );
I also tried these:
moveMap.bindCmd(keyboard, "tab lalt" , "" , "pause();" );
moveMap.bindCmd(keyboard, "tab ralt" , "" , "pause();" );
this works, but it also works when you just hit alt. I only want to pause it when the game looses focus due to alt tab.
Is there any callback that the game recieves when the window looses focus via alt tab? any of these solutions would help me.
Thanks,
Eyal.
this seems to work for alt F4. moveMap.bindCmd(keyboard, "alt F4" , "" , "pause();" );
but it doesn't work for alt tab. moveMap.bindCmd(keyboard, "alt tab" , "" , "pause();" );
neither this moveMap.bindCmd(keyboard, "tab alt" , "" , "pause();" );
I also tried these:
moveMap.bindCmd(keyboard, "tab lalt" , "" , "pause();" );
moveMap.bindCmd(keyboard, "tab ralt" , "" , "pause();" );
this works, but it also works when you just hit alt. I only want to pause it when the game looses focus due to alt tab.
Is there any callback that the game recieves when the window looses focus via alt tab? any of these solutions would help me.
Thanks,
Eyal.
Torque Owner Jeff Moretti
http://tdn.garagegames.com/wiki/TGB/Tutorials/Pause_Game