console.lua: exit with with Ctrl+[

This binding commonly closes similar input buffers like vim's
Command-line mode and dmenu.
This commit is contained in:
Guido Cella 2023-10-10 08:33:08 +02:00 committed by Dudemanguy
parent 81dea9031d
commit cf762c1482
2 changed files with 2 additions and 1 deletions

View File

@ -11,7 +11,7 @@ Keybindings
\`
Show the console.
ESC
ESC and Ctrl+[
Hide the console.
ENTER, Ctrl+J and Ctrl+M

View File

@ -830,6 +830,7 @@ end
function get_bindings()
local bindings = {
{ 'esc', function() set_active(false) end },
{ 'ctrl+[', function() set_active(false) end },
{ 'enter', handle_enter },
{ 'kp_enter', handle_enter },
{ 'shift+enter', function() handle_char_input('\n') end },