Why is Key F10 unfocussing my program?

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Squarefox
Competition winner
Posts: 118
Joined: Tue Aug 19, 2008 6:46 pm
Location: Delta quadrant, Borg nexus 0001
Contact:

Why is Key F10 unfocussing my program?

Post by Squarefox »

Hello,

I'm using an Irrlicht-FPS-camera in my program (runs in a window). If I press 'F10' the programm is unfocussed and I can freely move the mouse-cursor.
If I click somewhere in the programm-window, the programm is focussed again and the mouse-cursor is binded to the FPS-camera again.
The problem occurs wether I'm using 'F10' in the eventmanager or not. The operating system is Windows 7 x64.

Greetings,
Squarefox
Brainsaw
Posts: 1242
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Re: Why is Key F10 unfocussing my program?

Post by Brainsaw »

Just tried it (also Windows 7 64 Bit .. but IIRC it's the same on my old WinXP-32 System). Same behaviour as with the "ALT" key. Program does completely freeze, after re-focusing the window my program takes all physics steps since the time it was frozen (so it takes a little time until it runs smooth again)
Image
Dustbin::Games on the web: https://www.dustbin-online.de/
keigen-shu
Posts: 8
Joined: Wed Dec 28, 2011 1:35 pm

Re: Why is Key F10 unfocussing my program?

Post by keigen-shu »

That's because F10 activates Microsoft Windows' menu bar options (exists since Windows 95) and Irrlicht (as of 1.7.2) didn't prevent it from being activated. If you hit up or down after activating it you'll get a simple window manager drop-down menu (minimize, close, etc.).

I recommend avoiding the use of those keys.

Microsoft Knowledgebase article with all the shortcuts: http://support.microsoft.com/kb/126449
CuteAlien
Admin
Posts: 9933
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Why is Key F10 unfocussing my program?

Post by CuteAlien »

Seems to be fixed in svn trunk, probably won't be changed anymore for 1.7.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: Why is Key F10 unfocussing my program?

Post by Cube_ »

and there is no workaround? What if one REALLY needs to map function x to F10? (I bet someone has a project where they'd need all the Fx keys for mapping....)
"this is not the bottleneck you are looking for"
CuteAlien
Admin
Posts: 9933
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Why is Key F10 unfocussing my program?

Post by CuteAlien »

Well, the simplest workaround is to use svn trunk or wait for 1.8. Probably can also be handled in some way with windows-api tricks, but don't really have the time to dig into this right now (it's basically solved, we can't just change old behaviour for release versions as people might depend on it and there's just a bunch of way more serious problems).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: Why is Key F10 unfocussing my program?

Post by Cube_ »

so it is solved in SVN....
that's nice. thanks for the tip
"this is not the bottleneck you are looking for"
Post Reply