summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido Cella <guido@guidocella.xyz>2023-10-10 08:33:08 +0200
committerDudemanguy <random342@airmail.cc>2023-10-10 18:18:07 +0000
commitcf762c1482566dc8fcdea493b8f8a8a1b0710205 (patch)
tree39a57c31f8bcca9cb9e8258b776103b6d6f35f6b
parent81dea9031dec05559624b6d2a8ea9bf89667f755 (diff)
downloadmpv-cf762c1482566dc8fcdea493b8f8a8a1b0710205.tar.bz2
mpv-cf762c1482566dc8fcdea493b8f8a8a1b0710205.tar.xz
console.lua: exit with with Ctrl+[
This binding commonly closes similar input buffers like vim's Command-line mode and dmenu.
-rw-r--r--DOCS/man/console.rst2
-rw-r--r--player/lua/console.lua1
2 files changed, 2 insertions, 1 deletions
diff --git a/DOCS/man/console.rst b/DOCS/man/console.rst
index cfcc643323..30f849e885 100644
--- a/DOCS/man/console.rst
+++ b/DOCS/man/console.rst
@@ -11,7 +11,7 @@ Keybindings
\`
Show the console.
-ESC
+ESC and Ctrl+[
Hide the console.
ENTER, Ctrl+J and Ctrl+M
diff --git a/player/lua/console.lua b/player/lua/console.lua
index c1958ef7dd..978ba51b6c 100644
--- a/player/lua/console.lua
+++ b/player/lua/console.lua
@@ -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 },