Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Win32] Keybindings with F1 send SWT.Help event #1493

Open
2wendex2 opened this issue Sep 26, 2024 · 1 comment
Open

[Win32] Keybindings with F1 send SWT.Help event #1493

2wendex2 opened this issue Sep 26, 2024 · 1 comment
Labels
Windows Happens on Windows OS

Comments

@2wendex2
Copy link

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:

  1. WM_KEYDOWN with wParam == VK_F1
  2. 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

  1. Prevent SWT.Help from being sent on WM_HELP, or prevent WM_HELP from being sent on WM_KEYF1.
  2. Sends SWT.Help on WM_KEYDOWN with wparam == VK_F1 if no keybindings are matched.
@2wendex2 2wendex2 changed the title Keybindings with F1 send SWT.Help event [Win32] Keybindings with F1 send SWT.Help event Sep 26, 2024
@jukzi jukzi added the Windows Happens on Windows OS label Sep 26, 2024
@jukzi
Copy link
Contributor

jukzi commented 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Windows Happens on Windows OS
Projects
None yet
Development

No branches or pull requests

2 participants