Fix shortcuts for non-qwerty keyboard layouts (revert #12892) (#13190)

This commit is contained in:
Salamandar 2022-09-19 10:21:45 +02:00 committed by GitHub
parent 50b67751d9
commit 0ce695577c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,6 +48,11 @@ export default <T extends Constructor<HassElement>>(superClass: T) =>
private _registerShortcut() {
tinykeys(window, {
// Those are for latin keyboards that have e, c, m keys
e: (ev) => this._showQuickBar(ev),
c: (ev) => this._showQuickBar(ev, true),
m: (ev) => this._createMyLink(ev),
// Those are fallbacks for non-latin keyboards that don't have e, c, m keys (qwerty-based shortcuts)
KeyE: (ev) => this._showQuickBar(ev),
KeyC: (ev) => this._showQuickBar(ev, true),
KeyM: (ev) => this._createMyLink(ev),