The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3ca02a70f7f94f7479ffcd3ed7ca6d83ec58af10
commit 3ca02a70f7f94f7479ffcd3ed7ca6d83ec58af10 Author: Nathaniel Braun <[email protected]> AuthorDate: 2026-01-17 17:14:42 +0000 Commit: Ed Maste <[email protected]> CommitDate: 2026-02-23 14:22:55 +0000 vt: Fix handling of backtab PR: 292463 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2002 (cherry picked from commit 5fec99caff3ac4f476bb88078ebf85fbecf6afb3) --- sys/dev/vt/vt_core.c | 6 ++++++ sys/teken/teken.c | 4 ++++ sys/teken/teken.h | 2 ++ 3 files changed, 12 insertions(+) diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index 6d1012110678..bd6596eceacb 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -950,6 +950,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): @@ -1962,6 +1965,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. */
