-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Closed
Labels
GUI: webaggGood first issueOpen a pull request against these issues if there are no active ones!Open a pull request against these issues if there are no active ones!
Milestone
Description
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 as 1, etc.
Expected outcome
Correct keys.
Matplotlib version
- Operating system: linux
- Matplotlib version: head
- Matplotlib backend (
print(matplotlib.get_backend())): webagg - Python version: 39
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
GUI: webaggGood first issueOpen a pull request against these issues if there are no active ones!Open a pull request against these issues if there are no active ones!