1. Disable F10 for menu bar
- Posted by penpal0andrew Jun 29, 2009
- 1098 views
My application does not use menus, so I want to use F10 for my program. Is there any way to over ride the default Windows behavior. When I googled this, I found out that this F10 behavior is done in Linux as well. But I want the solution for MS Windows as supported by Euphoria.
Thanks. A. Katz
2. Re: Disable F10 for menu bar
- Posted by DerekParnell (admin) Jun 29, 2009
- 1105 views
My application does not use menus, so I want to use F10 for my program. Is there any way to over ride the default Windows behavior. When I googled this, I found out that this F10 behavior is done in Linux as well. But I want the solution for MS Windows as supported by Euphoria.
Thanks. A. Katz
If you are using win32lib you can call ...
integer PrevF10Flag PrevF10Flag = skipF10( w32True )
3. Re: Disable F10 for menu bar
- Posted by penpal0andrew Jun 29, 2009
- 1130 views
My application does not use menus, so I want to use F10 for my program. Is there any way to over ride the default Windows behavior. When I googled this, I found out that this F10 behavior is done in Linux as well. But I want the solution for MS Windows as supported by Euphoria.
Thanks. A. Katz
If you are using win32lib you can call ...
integer PrevF10Flag PrevF10Flag = skipF10( w32True )
Either this does not work, or I am using it wrong, or it does not apply to my situation. Here is test code which is how my program uses the keys. If you press F10 it will work every other time. And it disables F9 every other time.
without warning include win32lib.ew integer win, text9, text10, count9, count10 procedure Screen_keydown(integer Self, integer Event, sequence Params) -- Application hot key detector if Params[1] = VK_F9 then count9 += 1 setText(text9, sprintf("F9 pressed %d times",{count9})) elsif Params[1] = VK_F10 then VOID = skipF10( w32True ) count10 += 1 setText(text10, sprintf("F10 pressed %d times",{count10})) end if end procedure setHandler(Screen, w32HKeyDown, routine_id("Screen_keydown")) procedure main() count9 = 0 count10 = 0 win = createEx(Window, "Test F10 control", 0, 0, 0, 400, 200, 0, 0) text9 = createEx( LText, "F9 pressed 0 times", win, 4, 70, 120, 20, 0, 0 ) text10 = createEx( LText, "F10 pressed 0 times", win, 4, 100, 120, 20, 0, 0 ) WinMain(win, Normal) end procedure main()
4. Re: Disable F10 for menu bar
- Posted by DerekParnell (admin) Jun 29, 2009
- 1118 views
Either this does not work ...
There is a bug. You can change one line in win32lib.ew to fix it.
Almost at the end of the routine fDoKeys(), locate this line
if isDown and isSys and not shifts and wParam = VK_F10 and vSkipF10 then
and change it to
if (isDown and isSys and not shifts) or (wParam = VK_F10 and vSkipF10) then
5. Re: Disable F10 for menu bar
- Posted by penpal0andrew Jun 29, 2009
- 1099 views
- Last edited Jun 30, 2009
Either this does not work ...
There is a bug. You can change one line in win32lib.ew to fix it.
Almost at the end of the routine fDoKeys(), locate this line
if isDown and isSys and not shifts and wParam = VK_F10 and vSkipF10 then
and change it to
if (isDown and isSys and not shifts) or (wParam = VK_F10 and vSkipF10) then
Thank you. Let me know when this change is in a release number for win32lib.ew.
6. Re: Disable F10 for menu bar
- Posted by DerekParnell (admin) Jun 29, 2009
- 1142 views
- Last edited Jun 30, 2009
Thank you. Let me know when this change is in a release number for win32lib.ew.
Already done. See SVN#60