Function keys F10 & F12

Found a bug? Post information about it here so we can fix it!

Moderator: Moderators

Post Reply
User avatar
Ats
Posts: 710
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Function keys F10 & F12

Post by Ats »

I'm using the function keys F1 to F12 in order to debug Omeganaut, but I've stumble on two problems with that:
  • F10 key (code 121) seems to do nothing
  • F12 key (code 123) is equal to a left mouse click
Is that something related to CharCode or ZGE is using those numbers for internal things?
There no info about that on the wiki: http://zgameeditor.org/index.php/ComponentRef/KeyPress

Thanks :)
User avatar
Kjell
Posts: 1910
Joined: Sat Feb 23, 2008 11:15 pm

Re: Function keys F10 & F12

Post by Kjell »

Hi Ats,
Ats wrote: Mon May 13, 2019 9:01 amF10 key (code 121) seems to do nothing
F10 is a bit of a special case in Windows. It's possible to get it to work, but you need a bit of a workaround .. here's a snippet from MSDN ( for Ville ).

If the F10 key is pressed, the DefWindowProc function sets an internal flag. When DefWindowProc receives the WM_KEYUP message, the function checks whether the internal flag is set and, if so, sends a WM_SYSCOMMAND message to the top-level window. The WM_SYSCOMMAND parameter of the message is set to SC_KEYMENU.
Ats wrote: Mon May 13, 2019 9:01 amF12 key (code 123) is equal to a left mouse click
The 3 mouse buttons override F12, F13 and F14 because "{", "|" and "}" are mapped to the same key-codes by the ASCII standard.

K
User avatar
Ats
Posts: 710
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: Function keys F10 & F12

Post by Ats »

Thanks for the explanations Kjell, that's good to know, and should be written down in the ZGE wiki :D
I'm going to move my debug keys from the function keys to the number keys then.
Post Reply