github / github/markdown-toolbar-element
Hotkeys don't work on Windows with non en-us keyboard layout
- Langage dominant
- JavaScript
- Étoiles
- 411
- Forks
- 60
- Merge moyen
- 2 j 22 h
- PR mergées (30 j)
- 6
Description
Current way of matching hotkey with `event.key` property leads to broken hotkeys on Windows (Chrome, Vivaldi at least) as, for example with ru-RU locale on keybord hitting cmd+b will send event with `key` property set to cyrillic "и" and not "b".
First it was found in https://github.com/umputun/remark/issues/404
Images provided by @Andrew-Shtein prove difference in `key` prop


Issue located here:
https://github.com/github/markdown-toolbar-element/blob/dd0ffba8d9ad9d64471d3be41b3b7e1b77aa3545/index.js#L228-L236
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Start in index.js at lines 228-236, where hotkeys are matched from the keyboard event, and reproduce the issue in Chrome or Vivaldi with a non-en-US layout such as ru-RU. Trace the current matching behavior and verify that each documented hotkey triggers the same command regardless of keyboard layout.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript
- Domaine
- frontend
- Type d'issue
- Bug
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 52/100