8000 Bind WX_CHAR_HOOK instead of WX_KEY_DOWN for wx key_press_event. by anntzer · Pull Request #15177 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Bind WX_CHAR_HOOK instead of WX_KEY_DOWN for wx key_press_event. #15177

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

Merged
merged 1 commit into from
Oct 31, 2020

Conversation

anntzer
Copy link
Contributor
@anntzer anntzer commented Sep 3, 2019

PR Summary

AFAICT this fixes #8249 on Windows and doesn't break Linux.

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@anntzer anntzer added the GUI: wx label Sep 3, 2019
@tacaswell tacaswell added this to the v3.3.0 milestone Sep 4, 2019
@tacaswell
Copy link
Member

Does this still get the key-up events in all cases?

I am a bit worried that based on the title of the SO post reference in #8249 (comment) that we are defeating the internal widget focus logic of WX which would lead to bad behavior if the user is embedding in a bigger application with a text box and now we will see all of the key-down to that text box (which given our default key bindings could do very surprising things).

@anntzer
Copy link
Contributor Author
anntzer commented Sep 4, 2019

key release events still go through as expected both on windows and linux.
dunno about the embedding case.

Copy link
Member
@QuLogic QuLogic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes arrows and other special keys like home/end/insert/delete on Windows. Key release is not broken.

@timhoffm timhoffm merged commit e69e2e6 into matplotlib:master Oct 31, 2020
@anntzer anntzer deleted the wxcharhook branch October 31, 2020 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug in mpl_connect(): On Windows, with the wx backend, arrow keys are not reported
4 participants
0