fix double binding of shortcut "d" (#972)

This commit is contained in:
Paul Korecky
2024-05-26 14:09:22 +02:00
committed by GitHub
parent a4dc7f7396
commit 6eafa75325
2 changed files with 2 additions and 2 deletions

View File

@@ -111,7 +111,7 @@ export class SeMenuItem extends HTMLElement {
// only track keyboard shortcuts for the body containing the SVG-Editor
if (e.target.nodeName !== 'BODY') return
// normalize key
const key = `${(e.metaKey) ? 'meta+' : ''}${(e.ctrlKey) ? 'ctrl+' : ''}${e.key.toUpperCase()}`
const key = `${(e.metaKey) ? 'meta+' : ''}${(e.ctrlKey) ? 'ctrl+' : ''}${(e.shiftKey) ? 'shift+' : ''}${e.key.toUpperCase()}`
if (shortcut !== key) return
// launch the click event
if (this.id) {