Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

more robust check for enter key in TextBox #19262

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
Jan 9, 2021

Conversation

ianhi
Copy link
Contributor

@ianhi ianhi commented Jan 9, 2021

PR Summary

TextBox now checks for both return and enter to check for submission. On my system:

Thinkpad T490
PopOs 20.04 
5.8.0-7630-generic #32~1605108853~20.04~8bcf10e-Ubuntu SMP Wed Nov 11 22:42:16 UTC  x86_64 x86_64 x86_64 GNU/Linux

Hitting the key silkscreend as labelled Enter produces a KeyEvent with event.key of return

You can check this on your system with:

import matplotlib.pyplot as plt
fig, ax = plt.subplots()
def _keypress(event):
    print(event)
    print(event.key)
fig.canvas.mpl_connect('key_press_event', _keypress)
plt.show()

PR Checklist

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • [NA ] New features are documented, with examples if plot related.
  • [NA ] Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • [NA ] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [NA ] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

@ianhi
Copy link
Contributor Author

ianhi commented Jan 9, 2021

The test failure seems very unrelated:
image

Though the failfast github actions seem to have prevented the ubuntu tests from running

@QuLogic
Copy link
Member

QuLogic commented Jan 9, 2021

Why does homebrew have PHP depend on Python?

@timhoffm timhoffm merged commit fce0ee8 into matplotlib:master Jan 9, 2021
@QuLogic QuLogic added this to the v3.4.0 milestone Jan 9, 2021
@ianhi ianhi deleted the textbox-submit branch January 9, 2021 15:48
jeromefv pushed a commit to jeromefv/matplotlib that referenced this pull request Jan 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.