mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Ignore modifier keys when forwarding events to quickbar (#12525)
This commit is contained in:
parent
092dfd1e87
commit
a4a0d7cf19
@ -74,7 +74,11 @@ export class HassioMain extends SupervisorBaseElement {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Forward keydown events to the main window for quickbar access
|
// Forward keydown events to the main window for quickbar access
|
||||||
document.body.addEventListener("keydown", (ev) => {
|
document.body.addEventListener("keydown", (ev: KeyboardEvent) => {
|
||||||
|
if (ev.altKey || ev.ctrlKey || ev.shiftKey || ev.metaKey) {
|
||||||
|
// Ignore if modifier keys are pressed
|
||||||
|
return;
|
||||||
|
}
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
fireEvent(mainWindow, "hass-quick-bar-trigger", ev, {
|
fireEvent(mainWindow, "hass-quick-bar-trigger", ev, {
|
||||||
bubbles: false,
|
bubbles: false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user