Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
  • Loading branch information
susnux authored Aug 30, 2024
1 parent 359468b commit 8384217
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/composables/useHotKey/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function shouldIgnoreEvent(event) {

const eventHandler = (callback, options) => (event) => {
const ctrlKeyPressed = isMac ? event.metaKey : event.ctrlKey
if (!!options.ctrl !== ctrlKeyPressed) {
if (ctrlKeyPressed !== Boolean(options.ctrl)) {
// Ctrl is required and not pressed, or the opposite
return
} else if (!!options.alt !== event.altKey) {
Expand Down

0 comments on commit 8384217

Please sign in to comment.