diff options
author | ed <ed@FreeBSD.org> | 2009-11-11 09:43:26 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-11-11 09:43:26 +0000 |
commit | 8b7fe57057cf270ab4c7b5d528745a4fb8030f7e (patch) | |
tree | 372b79a82980192804adbe450460099b37bc7c2c | |
parent | b9738de004ee6a85518ac03782f29e0e24e8200a (diff) | |
download | FreeBSD-src-8b7fe57057cf270ab4c7b5d528745a4fb8030f7e.zip FreeBSD-src-8b7fe57057cf270ab4c7b5d528745a4fb8030f7e.tar.gz |
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.
-rw-r--r-- | sys/teken/teken.c | 4 | ||||
-rw-r--r-- | sys/teken/teken.h | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/teken/teken.c b/sys/teken/teken.c index d50edc8..1435d2f 100644 --- a/sys/teken/teken.c +++ b/sys/teken/teken.c @@ -484,8 +484,8 @@ static const char * const special_strings_cons25[] = { [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_strings_normal[] = { [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", diff --git a/sys/teken/teken.h b/sys/teken/teken.h index e129d47..36cb71a 100644 --- a/sys/teken/teken.h +++ b/sys/teken/teken.h @@ -173,10 +173,10 @@ void teken_set_winsize(teken_t *, const teken_pos_t *); #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 |