-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Workaround to fix QTBUG-67275: respect Enter key for triggering context menu items #81
Workaround to fix QTBUG-67275: respect Enter key for triggering context menu items #81
Conversation
This feels so wrong, Enter is used to trigger menu items everywhere in addition to Space but with Qt 5.10.1 only Space works... According to https://stackoverflow.com/questions/49436480/qml-menuitem-trigger-by-enter-and-keyboard-events-forwarding-dont-work this look like a behavior change compared to Controls 1 so maybe the Qt developers forgot about Enter with Controls 2? You should file a bug report. |
Please if you merge this commit change the commit message to reflect that this is a workaround for a Qt behavior that doesn't feel right. Also link to the Qt bug report. |
@plfiorini thx, I'll do |
I'm trying to understand how Key press and release events of the abstract button only handle Space, see here and here. If my analysis is right the same problem should happen with push buttons. The fix seems simple: just check for Enter too and keypad Enter, in addition to Space. |
@plfiorini yes, came up to the same thoughts |
Maybe the patch can be sent to the 5.9 or 5.11 branch and might be even part of Qt 5.11.0 in May. |
@plfiorini I don't have experience sending patches, what is a right process for that? I'll need to test the patch somehow, and I'm afraid it's a big deal, since you should recompile Qt |
You need a gerrit account at https://codereview.qt-project.org, sign the contribution agreement and follow the guide: http://wiki.qt.io/Qt_Contribution_Guidelines Considering that I built Qt 5.11 from sources two days ago I can make the patch if you submit a bug report :) |
@plfiorini it would be great. Here's a bug https://bugreports.qt.io/browse/QTBUG-67275 |
688db5a
to
749d42f
Compare
@plfiorini fixed commit description as well |
Thank you @PoisonousJohn and @plfiorini!
It will look better in GitHub and in the console. |
It's a workaround to fix QTBUG-67275
33ab0dd
to
2a2faa9
Compare
Right now it's not possible to trigger MenuItems in context menu using Enter key, which is a default behavior for all platforms