From ac234fd5eb079d9e21485ac7d4b06c2c30d2db2a Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 23 Jan 2018 00:47:20 +0800 Subject: add exit command --- xmake/core/ui/program.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'xmake/core/ui/program.lua') diff --git a/xmake/core/ui/program.lua b/xmake/core/ui/program.lua index ff152584f..8407d3e6b 100644 --- a/xmake/core/ui/program.lua +++ b/xmake/core/ui/program.lua @@ -164,7 +164,10 @@ function program:event_on(e) end -- quit program? - if e.type == event.ev_keyboard and (e.key_name == "Esc" or e.key_name == "CtrlC") then + if e.type == event.ev_keyboard and e.key_name == "CtrlC" then + self:send("cm_exit") + return true + elseif event.is_command(e, "cm_exit") then self:quit() return true end -- cgit v1.3.1