aboutsummaryrefslogtreecommitdiff
path: root/sys/teken
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-11-11 09:43:26 +0000
committerEd Schouten <ed@FreeBSD.org>2009-11-11 09:43:26 +0000
commitd80a1e6c1b3a6e0e070cd22344d2defbee84daeb (patch)
tree372b79a82980192804adbe450460099b37bc7c2c /sys/teken
parentc8f1c8170247cad4b9d1da3bb626ea06d413fb73 (diff)
downloadsrc-d80a1e6c1b3a6e0e070cd22344d2defbee84daeb.tar.gz
src-d80a1e6c1b3a6e0e070cd22344d2defbee84daeb.zip
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.
Notes
Notes: svn path=/head/; revision=199175
Diffstat (limited to 'sys/teken')
-rw-r--r--sys/teken/teken.c4
-rw-r--r--sys/teken/teken.h8
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/teken/teken.c b/sys/teken/teken.c
index d50edc844e5e..1435d2fa9b18 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 e129d471d4cf..36cb71aa1d04 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