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

Keypresses are registered twice #59

Closed
philipstarkey opened this issue May 30, 2018 · 4 comments
Closed

Keypresses are registered twice #59

philipstarkey opened this issue May 30, 2018 · 4 comments
Labels
bug Something isn't working major

Comments

@philipstarkey
Copy link
Member

Original report (archived issue) by Russell Anderson (Bitbucket: rpanderson, GitHub: rpanderson).


Since Qt5 (pull request #9), keypress events have been registered twice. Below I have debugged this by adding logger.info lines to on_keyPress and on_keyRelease .

Pressing F5 once used to (up to and including e2b367f) result in:

2018-05-30 17:07:41,486 INFO runmanager: on_keyPress: F5
2018-05-30 17:07:45,592 INFO runmanager: on_keyRelease: F5
2018-05-30 17:07:45,594 INFO runmanager: Engage
2018-05-30 17:07:45,595 INFO runmanager: Parsing globals...
2018-05-30 17:07:45,607 INFO runmanager: Making h5 files
2018-05-30 17:07:45,609 INFO runmanager: end engage

... but now results in (6459a3c and beyond):

2018-05-30 17:10:28,493 INFO runmanager: on_keyPress: F5
2018-05-30 17:10:28,496 INFO runmanager: on_keyPress: F5
2018-05-30 17:10:30,209 INFO runmanager: on_keyRelease: F5
2018-05-30 17:10:30,210 INFO runmanager: Engage
2018-05-30 17:10:30,210 INFO runmanager: Parsing globals...
2018-05-30 17:10:30,415 INFO runmanager: Making h5 files
2018-05-30 17:10:30,417 INFO runmanager: end engage
2018-05-30 17:10:30,424 INFO runmanager: on_keyRelease: F5
2018-05-30 17:10:30,424 INFO runmanager: Engage
2018-05-30 17:10:30,424 INFO runmanager: Parsing globals...
2018-05-30 17:10:30,430 INFO runmanager: Making h5 files
2018-05-30 17:10:30,437 INFO runmanager: end engage

To properly intercept the QtCore.QEvent.KeyPress and not have it handled twice, notify of KeyPressQApplication should return 1 (or True) for relevant events SO.

@philipstarkey
Copy link
Member Author

Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


  • changed state from "new" to "resolved"

Resolves issue #59 (each QtCore.QEvent.KeyPress and QtCore.QEvent.KeyRelease
event was handled twice).

→ <<cset a67c0c2>>

@philipstarkey
Copy link
Member Author

Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


Merged in cbillington/runmanager/QShortcuts (pull request #23)

Use QShortcuts for keyboard shortcuts, resolving issue #59

Approved-by: Russell Anderson russell.anderson@monash.edu

→ <<cset 63f9a82>>

@philipstarkey
Copy link
Member Author

Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


Use QShortcuts for keyboard shortcuts, resolving issue #59

→ <<cset 0a3768c>>

@philipstarkey
Copy link
Member Author

Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


Merged in cbillington/runmanager/QShortcuts (pull request #23)

Use QShortcuts for keyboard shortcuts, resolving issue #59

Approved-by: Russell Anderson russell.anderson@monash.edu

→ <<cset 63f9a82>>

@philipstarkey philipstarkey added major bug Something isn't working labels Apr 5, 2020
philipstarkey pushed a commit to philipstarkey/runmanager that referenced this issue Jun 25, 2020
…t.KeyPress and QtCore.QEvent.KeyRelease

event was handled twice).
philipstarkey pushed a commit to philipstarkey/runmanager that referenced this issue Jun 25, 2020
…doubling

up on keypress events in the tab widget like in issue labscript-suite#59
philipstarkey pushed a commit to philipstarkey/runmanager that referenced this issue Jun 25, 2020
…uite#23)

Use QShortcuts for keyboard shortcuts, resolving issue labscript-suite#59

Approved-by: Russell Anderson <russell.anderson@monash.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working major
Projects
None yet
Development

No branches or pull requests

1 participant