We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Bug summary
Non alphanumeric key events are reported incorrectly on webagg.
Code for reproduction
MPLBACKEND=webagg python -c 'from pylab import *; plot(); gcf().canvas.mpl_connect("key_press_event", lambda e: print(e.key)); show()'
then press some keys while using e.g. an https://en.wikipedia.org/wiki/AZERTY keyboard layout.
Actual outcome
& is reported as 1, etc.
&
1
Expected outcome
Correct keys.
Matplotlib version
print(matplotlib.get_backend())
From a quick look mpl.js is using https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/which + a hard-coded table; MDN says that which is deprecated and suggests using https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key instead.
which
The text was updated successfully, but these errors were encountered:
You can reproduce the bug on non-US keyboard layouts. I would like to work on this. Can I work on this?
Sorry, something went wrong.
👍 You are welcome to.
Merge pull request #19146 from tonadev/fix-webagg-values-for-key-events
5ad390d
Fix #19128: webagg reports incorrect values for non-alphanumeric key events on non-qwerty keyboards
Successfully merging a pull request may close this issue.
Bug report
Bug summary
Non alphanumeric key events are reported incorrectly on webagg.
Code for reproduction
MPLBACKEND=webagg python -c 'from pylab import *; plot(); gcf().canvas.mpl_connect("key_press_event", lambda e: print(e.key)); show()'
then press some keys while using e.g. an https://en.wikipedia.org/wiki/AZERTY keyboard layout.
Actual outcome
&
is reported as1
, etc.Expected outcome
Correct keys.
Matplotlib version
print(matplotlib.get_backend())
): webaggFrom a quick look mpl.js is using https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/which + a hard-coded table; MDN says that
which
is deprecated and suggests using https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key instead.The text was updated successfully, but these errors were encountered: