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

right-click-enabler: Allow activation of the right click action by keyboard #2369

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

tyrylu
Copy link
Contributor

@tyrylu tyrylu commented Dec 28, 2024

This allows for example, selecting the audio output device for visually
impaired.

…yboard

This allows for example, selecting the audio output device for visually
impaired.
@f4exb
Copy link
Owner

f4exb commented Dec 31, 2024

Can you please explain what it is supposed to do?

@tyrylu
Copy link
Contributor Author

tyrylu commented Jan 2, 2025

yYou mean that the commit message is not descriptive enough (even with an example of a fixed use-case)?
It solves the bug where the right click action is only activatable using the mouse, and that's bad, because, well, not everyone uses the mouse.

@srcejon
Copy link
Collaborator

srcejon commented Jan 2, 2025

yYou mean that the commit message is not descriptive enough (even with an example of a fixed use-case)? It solves the bug where the right click action is only activatable using the mouse, and that's bad, because, well, not everyone uses the mouse.

Looks like it allows use of the menu key or shift-f10 to emulate right mouse click on the focused widget. Shift-f10 is the standard windows keyboard shortcut to display a context menu.

@f4exb
Copy link
Owner

f4exb commented Jan 2, 2025

@tyrylu It just misses which keys are to be used at least in the comments

Thanks for the explanation @srcejon I tried in Linux but mousing over a right click enabled button and pressing Shift+F10 just does nothing. Is it a Windows only feature?

@srcejon
Copy link
Collaborator

srcejon commented Jan 2, 2025

Thanks for the explanation @srcejon I tried in Linux but mousing over a right click enabled button and pressing Shift+F10 just does nothing. Is it a Windows only feature?

I think you need to give the widget focus by tabbing to it. Cursor can be anywhere on screen.

However, shift-F10 doesn't work for me on Windows either. The menu key does work though.

Oddly, no KeyPress event gets to the rightclickhandler for shift-F10.

@f4exb
Copy link
Owner

f4exb commented Jan 2, 2025

Oddly, no KeyPress event gets to the rightclickhandler for shift-F10.

That's what I noticed also by putting there a debug message.

@f4exb
Copy link
Owner

f4exb commented Jan 2, 2025

My mistake... it seems it works (on Linux) by tabbing to the concerned widget and not by mousing over.
Well so I think we can validate this.

@f4exb f4exb merged commit 3f7e119 into f4exb:master Jan 2, 2025
5 checks passed
@srcejon
Copy link
Collaborator

srcejon commented Jan 2, 2025

The problem with shift-F10 on Windows, it's that Qt automatically converts it in to a QEvent::ContextMenu - which we are currently filtering, because that was giving us pop-up menus when tap-and-hold is used to emulate right-clicks. So I probably need to revisit that.

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

Successfully merging this pull request may close these issues.

3 participants