summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMurray Campbell <murray@sonology.net>2020-04-14 16:03:23 -0700
committerwm4 <1387750+wm4@users.noreply.github.com>2020-04-15 16:46:25 +0200
commitcaa5d8170efdc2f229d4e2ae0251a6d29880966e (patch)
tree77a29d6682f80d8abb6eae3b4de2d9613f1be517
parentec7f2388af2df27bf0f7e1801b39729f9755baed (diff)
downloadmpv-caa5d8170efdc2f229d4e2ae0251a6d29880966e.tar.bz2
mpv-caa5d8170efdc2f229d4e2ae0251a6d29880966e.tar.xz
terminal-unix: add key_entry defs for DECCKM mode
zsh often sets DECCKM (i.e. Cursor Key Mode) meaning the arrow keys send `SS3 A/B/C/D` instead of `CSI A/B/C/D`. Add `key_entry` definitions for this alongside the existing DECCKM Reset definitions.
-rw-r--r--osdep/terminal-unix.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/osdep/terminal-unix.c b/osdep/terminal-unix.c
index 954c13904f..a2959ba237 100644
--- a/osdep/terminal-unix.c
+++ b/osdep/terminal-unix.c
@@ -84,6 +84,10 @@ static const struct key_entry keys[] = {
{"\033[23~", MP_KEY_F+11},
{"\033[24~", MP_KEY_F+12},
+ {"\033OA", MP_KEY_UP},
+ {"\033OB", MP_KEY_DOWN},
+ {"\033OC", MP_KEY_RIGHT},
+ {"\033OD", MP_KEY_LEFT},
{"\033[A", MP_KEY_UP},
{"\033[B", MP_KEY_DOWN},
{"\033[C", MP_KEY_RIGHT},