summaryrefslogtreecommitdiff
path: root/xmake/core/ui/program.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2018-01-23 00:47:20 +0800
committerruki <[email protected]>2018-01-22 22:44:03 +0800
commitac234fd5eb079d9e21485ac7d4b06c2c30d2db2a (patch)
treeb1e636c11fb9a4128f00f71a42f9c3b07a0fae64 /xmake/core/ui/program.lua
parent6d116a4bc1b58f660a60ff206c6c57ee9c939805 (diff)
add exit command
Diffstat (limited to 'xmake/core/ui/program.lua')
-rw-r--r--xmake/core/ui/program.lua5
1 files changed, 4 insertions, 1 deletions
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