aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathaniel Braun <nathaniel.braun@gmail.com>2026-01-17 17:14:42 +0000
committerWarner Losh <imp@FreeBSD.org>2026-02-08 16:44:42 +0000
commit5fec99caff3ac4f476bb88078ebf85fbecf6afb3 (patch)
treea893eed1696beb2bef39cfdc50ae448be01afe21
parent5beaa1ee7595ce4a09ac4827ec3e3e2aa13a9f67 (diff)
-rw-r--r--sys/dev/vt/vt_core.c6
-rw-r--r--sys/teken/teken.c4
-rw-r--r--sys/teken/teken.h2
3 files changed, 12 insertions, 0 deletions
diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c
index fd18e85092db..b9159a73ad79 100644
--- a/sys/dev/vt/vt_core.c
+++ b/sys/dev/vt/vt_core.c
@@ -952,6 +952,9 @@ vt_processkey(keyboard_t *kbd, struct vt_device *vd, int c)
VT_UNLOCK(vd);
break;
}
+ case BKEY | BTAB: /* Back tab (usually, shift+tab). */
+ terminal_input_special(vw->vw_terminal, TKEY_BTAB);
+ break;
case FKEY | F(1): case FKEY | F(2): case FKEY | F(3):
case FKEY | F(4): case FKEY | F(5): case FKEY | F(6):
case FKEY | F(7): case FKEY | F(8): case FKEY | F(9):
@@ -1964,6 +1967,9 @@ vtterm_cngetc(struct terminal *tm)
VTBUF_SLCK_DISABLE(&vw->vw_buf);
}
break;
+ case SPCLKEY | BTAB: /* Back tab (usually, shift+tab). */
+ vw->vw_kbdsq = "\x1b[Z";
+ break;
/* XXX: KDB can handle history. */
case SPCLKEY | FKEY | F(50): /* Arrow up. */
vw->vw_kbdsq = "\x1b[A";
diff --git a/sys/teken/teken.c b/sys/teken/teken.c
index b0161a2e3b20..a1522e00ecf7 100644
--- a/sys/teken/teken.c
+++ b/sys/teken/teken.c
@@ -703,6 +703,8 @@ static const char * const special_strings_cons25[] = {
[TKEY_F7] = "\x1B[S", [TKEY_F8] = "\x1B[T",
[TKEY_F9] = "\x1B[U", [TKEY_F10] = "\x1B[V",
[TKEY_F11] = "\x1B[W", [TKEY_F12] = "\x1B[X",
+
+ [TKEY_BTAB] = "\x1B[Z",
};
static const char * const special_strings_ckeys[] = {
@@ -726,6 +728,8 @@ static const char * const special_strings_normal[] = {
[TKEY_F7] = "\x1B[18~", [TKEY_F8] = "\x1B[19~",
[TKEY_F9] = "\x1B[20~", [TKEY_F10] = "\x1B[21~",
[TKEY_F11] = "\x1B[23~", [TKEY_F12] = "\x1B[24~",
+
+ [TKEY_BTAB] = "\x1B[Z",
};
const char *
diff --git a/sys/teken/teken.h b/sys/teken/teken.h
index 38a85e80110e..c8c73db55f06 100644
--- a/sys/teken/teken.h
+++ b/sys/teken/teken.h
@@ -206,6 +206,8 @@ void teken_set_winsize_noreset(teken_t *, const teken_pos_t *);
#define TKEY_F10 0x13
#define TKEY_F11 0x14
#define TKEY_F12 0x15
+
+#define TKEY_BTAB 0x16
const char *teken_get_sequence(const teken_t *, unsigned int);
/* Legacy features. */