github / github/markdown-toolbar-element

Hotkeys don't work on Windows with non en-us keyboard layout

Abierto
#15 1 comentario 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
JavaScript
Estrellas
411
Forks
60
Merge medio
2 d 22 h
PR fusionados (30 d)
6

Descripción

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
![](https://user-images.githubusercontent.com/12440746/62982919-fe164e00-be70-11e9-8ae5-44a37d90ef3e.png)
![](https://user-images.githubusercontent.com/12440746/62982927-040c2f00-be71-11e9-8ab1-2e76abb9c45d.png)

Issue located here:
https://github.com/github/markdown-toolbar-element/blob/dd0ffba8d9ad9d64471d3be41b3b7e1b77aa3545/index.js#L228-L236

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript
Área
frontend
Tipo de issue
Error
Dificultad
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Estancado
Claridad
Bien especificado
Aptitud para principiantes
52/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.