fix esacpe button

This commit is contained in:
MeexReay 2025-03-22 02:06:20 +03:00
parent cc679a5922
commit 3518af8c52

View File

@ -10,16 +10,22 @@ async function main(args) {
let run = true
(async () => {
setStdinFlag(SILENT_STDIN)
setStdinFlag(ENABLE_STDIN)
while (true) {
let event = await pollStdinEvent()
if (event.type == "key") {
if (event.key == "Escape") {
run = false
return
break
}
}
}
setStdinFlag(RENDER_STDIN)
setStdinFlag(DISABLE_STDIN)
})()
while (run) {