Open xuhuihui opened 2 years ago
Question:When you press Command+C, then release C, press S, you will call the browser default event. Expect:Whenever you press Command + S, invoke the registered event. Demo:https://codepen.io/hui-h-i/pen/bGLorEK
hotkeys('command+s', { keydown: true, element: document.body, }, (event) => { event.preventDefault(); console.log('a ctrl up'); });
Question:When you press Command+C, then release C, press S, you will call the browser default event. Expect:Whenever you press Command + S, invoke the registered event. Demo:https://codepen.io/hui-h-i/pen/bGLorEK
hotkeys('command+s', { keydown: true, element: document.body, }, (event) => { event.preventDefault(); console.log('a ctrl up'); });