Date: Wed, 11 Nov 2009 09:43:26 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r199175 - head/sys/teken Message-ID: <200911110943.nAB9hQde088980@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ed Date: Wed Nov 11 09:43:26 2009 New Revision: 199175 URL: http://svn.freebsd.org/changeset/base/199175 Log: Place home and end before insert and delete. These keys have different sequences when using cursorkeys, while insert and delete stay the same. If they are placed like this, libteken will return NULL instead of a proper sequence for these characters. Modified: head/sys/teken/teken.c head/sys/teken/teken.h Modified: head/sys/teken/teken.c ============================================================================== --- head/sys/teken/teken.c Wed Nov 11 08:39:57 2009 (r199174) +++ head/sys/teken/teken.c Wed Nov 11 09:43:26 2009 (r199175) @@ -484,8 +484,8 @@ static const char * const special_string [TKEY_UP] = "\x1B[A", [TKEY_DOWN] = "\x1B[B", [TKEY_LEFT] = "\x1B[D", [TKEY_RIGHT] = "\x1B[C", - [TKEY_INSERT] = "\x1B[L", [TKEY_DELETE] = "\x7F", [TKEY_HOME] = "\x1B[H", [TKEY_END] = "\x1B[F", + [TKEY_INSERT] = "\x1B[L", [TKEY_DELETE] = "\x7F", [TKEY_PAGE_UP] = "\x1B[I", [TKEY_PAGE_DOWN] = "\x1B[G", [TKEY_F1] = "\x1B[M", [TKEY_F2] = "\x1B[N", @@ -507,8 +507,8 @@ static const char * const special_string [TKEY_UP] = "\x1B[A", [TKEY_DOWN] = "\x1B[B", [TKEY_LEFT] = "\x1B[D", [TKEY_RIGHT] = "\x1B[C", - [TKEY_INSERT] = "\x1B[2~", [TKEY_DELETE] = "\x1B[3~", [TKEY_HOME] = "\x1B[H", [TKEY_END] = "\x1B[F", + [TKEY_INSERT] = "\x1B[2~", [TKEY_DELETE] = "\x1B[3~", [TKEY_PAGE_UP] = "\x1B[5~", [TKEY_PAGE_DOWN] = "\x1B[6~", [TKEY_F1] = "\x1BOP", [TKEY_F2] = "\x1BOQ", Modified: head/sys/teken/teken.h ============================================================================== --- head/sys/teken/teken.h Wed Nov 11 08:39:57 2009 (r199174) +++ head/sys/teken/teken.h Wed Nov 11 09:43:26 2009 (r199175) @@ -173,10 +173,10 @@ void teken_set_winsize(teken_t *, const #define TKEY_LEFT 0x02 #define TKEY_RIGHT 0x03 -#define TKEY_INSERT 0x04 -#define TKEY_DELETE 0x05 -#define TKEY_HOME 0x06 -#define TKEY_END 0x07 +#define TKEY_HOME 0x04 +#define TKEY_END 0x05 +#define TKEY_INSERT 0x06 +#define TKEY_DELETE 0x07 #define TKEY_PAGE_UP 0x08 #define TKEY_PAGE_DOWN 0x09
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911110943.nAB9hQde088980>