diff options
Diffstat (limited to 'xmake/core/ui/program.lua')
| -rw-r--r-- | xmake/core/ui/program.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/xmake/core/ui/program.lua b/xmake/core/ui/program.lua index 765d95732..2075a466d 100644 --- a/xmake/core/ui/program.lua +++ b/xmake/core/ui/program.lua @@ -141,6 +141,17 @@ function program:event() end end +-- on event +function program:event_on(e) + if panel.event_on(self, e) then + return true + end + if e.type == event.ev_keyboard and (e.key_name == "Esc" or e.key_name == "CtrlC") then + self:quit() + return true + end +end + -- put an event to view function program:event_put(e) |
