Add hotkey functionality to handle Escape key

This commit is contained in:
kwaroran
2024-04-25 01:08:03 +09:00
parent c0c5592c4c
commit cc744853d2

View File

@@ -75,6 +75,15 @@ export function initHotkey(){
}
}
}
if(ev.key === 'Escape'){
if(doingAlert()){
alertToast('Alert Closed')
}
if(get(settingsOpen)){
settingsOpen.set(false)
}
ev.preventDefault()
}
})
}