Add hotkey functionality to handle Escape key
This commit is contained in:
@@ -75,6 +75,15 @@ export function initHotkey(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(ev.key === 'Escape'){
|
||||||
|
if(doingAlert()){
|
||||||
|
alertToast('Alert Closed')
|
||||||
|
}
|
||||||
|
if(get(settingsOpen)){
|
||||||
|
settingsOpen.set(false)
|
||||||
|
}
|
||||||
|
ev.preventDefault()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user