awful: add C-g support in menu

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-06-18 12:46:12 +02:00
parent cd8ae9fe53
commit d9f49a0076
1 changed files with 14 additions and 7 deletions

View File

@ -482,13 +482,20 @@ local function menu(args, textbox, exe_callback)
end
-- Get out cases
if key == "Return" then
textbox:set("text", "")
exe_callback(command)
return false
elseif key == "Escape" then
textbox:set("text", "")
return false
if has_ctrl then
if key == "g" then
textbox:set("text", "")
return false
end
else
if key == "Return" then
textbox:set("text", "")
exe_callback(command)
return false
elseif key == "Escape" then
textbox:set("text", "")
return false
end
end
-- Control cases