dvtm

dynamic virtual terminal manager - with my changes
git clone https://pi.duncano.de/git/dvtm.git
Log | Files | Refs | README | LICENSE

commit 22009681c37e2647874fc090ed4ecafc6a569431
parent bc09c2d06faff47710e88b51206d7c3011247f0f
Author: Marc Andre Tanner <mat@brain-dump.org>
Date:   Fri,  6 Feb 2009 22:12:57 +0100

Use correct escape codes for HOME and END keys

This makes the keys actually work in emacs and less.

Reported-by: Donald Chai <donald.chai@gmail.com>

Diffstat:
madtty.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/madtty.c b/madtty.c @@ -158,12 +158,12 @@ static char const * const keytable[KEY_MAX+1] = { [KEY_SRIGHT] = "\e[1;2C", [KEY_SLEFT] = "\e[1;2D", [KEY_BACKSPACE] = "\177", - [KEY_HOME] = "\e[1~", [KEY_IC] = "\e[2~", [KEY_DC] = "\e[3~", - [KEY_END] = "\e[4~", [KEY_PPAGE] = "\e[5~", [KEY_NPAGE] = "\e[6~", + [KEY_HOME] = "\e[7~", + [KEY_END] = "\e[8~", [KEY_SUSPEND] = "\x1A", /* Ctrl+Z gets mapped to this */ [KEY_F(1)] = "\e[11~", [KEY_F(2)] = "\e[12~",