You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of the Bug
When a user presses any keybinding that includes the F1 key (e.g., Ctrl+F1), the SWT.Help event is sent alongside the intended keybinding. This is a probrem because if client wants to create keybinding with F1 then the SWT.Help event is sent alongside with the keybinding and this behaviour cannot be disabled
Desired Behavior
Keybindings with F1 should override SWT.Help in a manner similar to how keybindings override SWT.KeyDown event.
Cause of the Bug
On Windows, pressing the F1 key without the Alt modifier generates two windows messages:
WM_KEYDOWN with wParam == VK_F1
WM_KEYF1
Keybindings are handled by KeyBindingDispatcher filter listener which listens SWT.KeyDown event. SWT.KeyDown event is sent by dispatcher of WM_KEYDOWN. SWT.Help event is sent by dispatcher of WM_KEYDOWN which sent by DefWindowProc dispatching WM_KEYF1.
Possible Fixes
Prevent SWT.Help from being sent on WM_HELP, or prevent WM_HELP from being sent on WM_KEYF1.
Sends SWT.Help on WM_KEYDOWN with wparam == VK_F1 if no keybindings are matched.
The text was updated successfully, but these errors were encountered:
2wendex2
changed the title
Keybindings with F1 send SWT.Help event
[Win32] Keybindings with F1 send SWT.Help event
Sep 26, 2024
Can you propose a fix with a PR? However we might need to be sure that this "bug" is not used as "feature" by some consumers at least in the eclipse IDE.
Description of the Bug
When a user presses any keybinding that includes the F1 key (e.g., Ctrl+F1), the
SWT.Help
event is sent alongside the intended keybinding. This is a probrem because if client wants to create keybinding with F1 then theSWT.Help
event is sent alongside with the keybinding and this behaviour cannot be disabledDesired Behavior
Keybindings with F1 should override
SWT.Help
in a manner similar to how keybindings overrideSWT.KeyDown
event.Cause of the Bug
On Windows, pressing the F1 key without the Alt modifier generates two windows messages:
WM_KEYDOWN
withwParam == VK_F1
WM_KEYF1
Keybindings are handled by
KeyBindingDispatcher
filter listener which listensSWT.KeyDown
event.SWT.KeyDown
event is sent by dispatcher ofWM_KEYDOWN
.SWT.Help
event is sent by dispatcher ofWM_KEYDOWN
which sent byDefWindowProc
dispatchingWM_KEYF1
.Possible Fixes
SWT.Help
from being sent onWM_HELP
, or preventWM_HELP
from being sent onWM_KEYF1
.SWT.Help
onWM_KEYDOWN
withwparam == VK_F1
if no keybindings are matched.The text was updated successfully, but these errors were encountered: