Skip to content
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

Hotkeys work in EN layout only #404

Closed
mykola-petiukh opened this issue Aug 2, 2019 · 10 comments
Closed

Hotkeys work in EN layout only #404

mykola-petiukh opened this issue Aug 2, 2019 · 10 comments

Comments

@mykola-petiukh
Copy link

Repro: switch keyboard to other language than English and press Ctrl+B.

Demo on Youtube (clickable):

@Reeywhaar
Copy link
Collaborator

Reeywhaar commented Aug 2, 2019

We have hotkeys? :D

What system/browser? It seems to work on osx/firefox, though I hit cmd+b.

Also, can you check, if it works here on GitHub, since we use same package as github iirc

@umputun
Copy link
Owner

umputun commented Aug 2, 2019

yeah, I was shocked too :) Had to watch a video to figure out what hotkeys we have

@Reeywhaar
Copy link
Collaborator

@mykola-petiukh
Copy link
Author

What system/browser?

Vivaldi 2.6.1566.49 (Stable channel) (64-bit)
Windows 10 OS Version 1903 (Build 18362.267)

Github have the same issue.

@umputun
Copy link
Owner

umputun commented Aug 3, 2019

works for me on safari and chrome (both on macos).

@Reeywhaar
Copy link
Collaborator

It also works for me on osx/Vivaldi 2.6.1566.49 (Stable channel) (64-bit)

So, I guess it's either Vivaldi or @github/markdown-toolbar-element

Code related to this here https://github.com/github/markdown-toolbar-element/blob/dd0ffba8d9ad9d64471d3be41b3b7e1b77aa3545/index.js#L228-L236

Screenshot 2019-08-04 at 16 52 12

Package adds hotkey attribute to element and then searches for it on keydown. And it seems there is mismatch between hotkey attr and event.key.

@NikolayPetyukh if you have skill, can you please check, what hotkey attribute if you click select inspect element on any of the toolbar button? And then, is event.key of keydown event property is different on EN and RU layouts? https://w3c.github.io/uievents/tools/key-event-viewer.html

@Andrew-Shtein
Copy link

Chrome 76 on Windows 10. I confirm that the hotkeys only work on EN.

Screenshot_2

Screenshot_6

Screenshot_5

@Reeywhaar
Copy link
Collaborator

Reeywhaar commented Aug 13, 2019

@Andrew-Shtein, thanks!

As I expected on Windows key is different and it appears to be more close to spec. It's a markdown-toolbar-element issue. Made an issue there github/markdown-toolbar-element#15

@paskal
Copy link
Collaborator

paskal commented Mar 9, 2020

Reply from linked issue:

@ muan not bug.
That's not issue. It's expected, if you wanna create multilanguage support just add another hotkey data to div, for example:

[hotkey${currentKeyboardLang}="${event.key}"]

@paskal
Copy link
Collaborator

paskal commented Jan 8, 2023

We should not fix it on our side if the library doesn't support it: we then open a can of worms by trying to support the undocumented hotkey feature for dozens of languages we have. The only solution I think is appropriate is switching to another library which will do that.

Closing this as "won't fix", feel free to comment on the issue if your opinion differs from mine.

@paskal paskal closed this as not planned Won't fix, can't repro, duplicate, stale Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants