Skip to content

Commit

Permalink
Tweak keybinds to not trigger when button selected
Browse files Browse the repository at this point in the history
  • Loading branch information
tillvit committed Jun 11, 2024
1 parent 64dd81d commit afd731d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/util/Keybinds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ export class Keybinds {
}

static checkKey(event: KeyboardEvent, type: "keydown" | "keyup") {
if (this.app.windowManager.getFocusedWindow()) return
// if (this.app.windowManager.getFocusedWindow()) return
if ((<HTMLElement>event.target).classList.contains("inlineEdit")) return
if (event.target instanceof HTMLTextAreaElement) return
if (event.target instanceof HTMLInputElement) return
if (event.target instanceof HTMLButtonElement) return
if (["Meta", "Control", "Shift", "Alt"].includes(event.key)) return

const mods: Modifier[] = []
Expand Down

0 comments on commit afd731d

Please sign in to comment.