mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-21 06:26:55 +00:00
Fix exiting paint typing "e" in the shell
When exiting paint via the keyboard by typing "Ctrl" then "E" separately, we consume the "key" event within paint, leaving the shell to consume "read". To avoid this, we run a sleep(0) to gobble any other left-over events. Note, it's generally not enough to run a queueEvent/pullEvent here, as the char event may not have ended up on the queue yet. Alas, as this solution is pretty ugly.
This commit is contained in:
parent
2b029bd506
commit
c489d4bc4f
@ -290,6 +290,7 @@ local menu_choices = {
|
||||
return false
|
||||
end,
|
||||
Exit = function()
|
||||
sleep(0) -- Super janky, but consumes stray "char" events from pressing Ctrl then E separately.
|
||||
return true
|
||||
end,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user