summaryrefslogtreecommitdiff
path: root/xmake/core/ui/program.lua
diff options
context:
space:
mode:
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