From de408507f9fd2c2b336410c4affa3ca53a532381 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 3 Mar 2024 08:27:13 -0800 Subject: [PATCH] terminfo: regenerate all entries Previously we had lost StrikeThrough, and this fixes a few other discrepancies. This was generated on Ubuntu Noble (24.04), after installing the following packages: ncurses-term kitty-terminfo --- terminfo/a/aixterm/term.go | 2 + terminfo/a/alacritty/term.go | 3 +- terminfo/c/cygwin/term.go | 2 +- terminfo/e/emacs/term.go | 4 +- terminfo/h/hpterm/term.go | 4 +- terminfo/k/konsole/term.go | 114 ++-------------- terminfo/k/kterm/term.go | 2 +- terminfo/l/linux/term.go | 13 +- terminfo/p/pcansi/term.go | 2 +- terminfo/r/rxvt/term.go | 10 +- terminfo/s/screen/term.go | 4 +- terminfo/s/simpleterm/term.go | 238 +++++++++++++++++----------------- terminfo/t/tmux/term.go | 116 +++++++++-------- terminfo/v/vt100/term.go | 2 +- terminfo/v/vt102/term.go | 2 +- terminfo/v/vt220/term.go | 4 +- terminfo/v/vt320/term.go | 2 +- terminfo/v/vt400/term.go | 2 +- terminfo/v/vt52/term.go | 12 +- terminfo/w/wy50/term.go | 2 +- terminfo/w/wy99_ansi/term.go | 4 +- terminfo/x/xterm/term.go | 28 ++-- 22 files changed, 250 insertions(+), 322 deletions(-) diff --git a/terminfo/a/aixterm/term.go b/terminfo/a/aixterm/term.go index 96c06b55..503c9199 100644 --- a/terminfo/a/aixterm/term.go +++ b/terminfo/a/aixterm/term.go @@ -24,6 +24,8 @@ func init() { ResetFgBg: "\x1b[32m\x1b[40m", PadChar: "\x00", AltChars: "jjkkllmmnnqqttuuvvwwxx", + EnterAcs: "\x1b(0", + ExitAcs: "\x1b(B", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", diff --git a/terminfo/a/alacritty/term.go b/terminfo/a/alacritty/term.go index d3bac450..01013637 100644 --- a/terminfo/a/alacritty/term.go +++ b/terminfo/a/alacritty/term.go @@ -23,6 +23,7 @@ func init() { Bold: "\x1b[1m", Dim: "\x1b[2m", Italic: "\x1b[3m", + Blink: "\x1b[5m", Reverse: "\x1b[7m", EnterKeypad: "\x1b[?1h\x1b=", ExitKeypad: "\x1b[?1l\x1b>", @@ -36,7 +37,7 @@ func init() { EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", StrikeThrough: "\x1b[9m", - Mouse: "\x1b[M", + Mouse: "\x1b[<", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", diff --git a/terminfo/c/cygwin/term.go b/terminfo/c/cygwin/term.go index 7d21c61e..46a0a4a3 100644 --- a/terminfo/c/cygwin/term.go +++ b/terminfo/c/cygwin/term.go @@ -6,7 +6,7 @@ import "github.com/gdamore/tcell/v2/terminfo" func init() { - // ansi emulation for Cygwin + // ANSI emulation for Cygwin terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "cygwin", Colors: 8, diff --git a/terminfo/e/emacs/term.go b/terminfo/e/emacs/term.go index 5034b99a..f6d078d0 100644 --- a/terminfo/e/emacs/term.go +++ b/terminfo/e/emacs/term.go @@ -6,7 +6,7 @@ import "github.com/gdamore/tcell/v2/terminfo" func init() { - // gnu emacs term.el terminal emulation + // GNU Emacs term.el terminal emulation terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "eterm", Columns: 80, @@ -34,6 +34,8 @@ func init() { Colors: 8, Bell: "\a", Clear: "\x1b[H\x1b[J", + EnterCA: "\x1b7\x1b[?47h", + ExitCA: "\x1b[2J\x1b[?47l\x1b8", AttrOff: "\x1b[m", Underline: "\x1b[4m", Bold: "\x1b[1m", diff --git a/terminfo/h/hpterm/term.go b/terminfo/h/hpterm/term.go index c77ccd0e..56a0fb73 100644 --- a/terminfo/h/hpterm/term.go +++ b/terminfo/h/hpterm/term.go @@ -6,7 +6,7 @@ import "github.com/gdamore/tcell/v2/terminfo" func init() { - // hp X11 terminal emulator + // HP X11 terminal emulator (old) terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "hpterm", Aliases: []string{"X-hpterm"}, @@ -14,7 +14,7 @@ func init() { Lines: 24, Bell: "\a", Clear: "\x1b&a0y0C\x1bJ", - AttrOff: "\x1b&d@", + AttrOff: "\x1b&d@\x0f", Underline: "\x1b&dD", Bold: "\x1b&dB", Dim: "\x1b&dH", diff --git a/terminfo/k/konsole/term.go b/terminfo/k/konsole/term.go index 78aa1ac2..c32de963 100644 --- a/terminfo/k/konsole/term.go +++ b/terminfo/k/konsole/term.go @@ -12,6 +12,7 @@ func init() { Columns: 80, Lines: 24, Colors: 8, + Bell: "\a", Clear: "\x1b[H\x1b[2J", EnterCA: "\x1b7\x1b[?47h", ExitCA: "\x1b[2J\x1b[?47l\x1b8", @@ -20,6 +21,7 @@ func init() { AttrOff: "\x1b[0m\x0f", Underline: "\x1b[4m", Bold: "\x1b[1m", + Dim: "\x1b[2m", Italic: "\x1b[3m", Blink: "\x1b[5m", Reverse: "\x1b[7m", @@ -35,7 +37,8 @@ func init() { EnableAcs: "\x1b)0", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", - Mouse: "\x1b[M", + StrikeThrough: "\x1b[9m", + Mouse: "\x1b[<", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", @@ -62,58 +65,8 @@ func init() { KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", - KeyF13: "\x1bO2P", - KeyF14: "\x1bO2Q", - KeyF15: "\x1bO2R", - KeyF16: "\x1bO2S", - KeyF17: "\x1b[15;2~", - KeyF18: "\x1b[17;2~", - KeyF19: "\x1b[18;2~", - KeyF20: "\x1b[19;2~", - KeyF21: "\x1b[20;2~", - KeyF22: "\x1b[21;2~", - KeyF23: "\x1b[23;2~", - KeyF24: "\x1b[24;2~", - KeyF25: "\x1bO5P", - KeyF26: "\x1bO5Q", - KeyF27: "\x1bO5R", - KeyF28: "\x1bO5S", - KeyF29: "\x1b[15;5~", - KeyF30: "\x1b[17;5~", - KeyF31: "\x1b[18;5~", - KeyF32: "\x1b[19;5~", - KeyF33: "\x1b[20;5~", - KeyF34: "\x1b[21;5~", - KeyF35: "\x1b[23;5~", - KeyF36: "\x1b[24;5~", - KeyF37: "\x1bO6P", - KeyF38: "\x1bO6Q", - KeyF39: "\x1bO6R", - KeyF40: "\x1bO6S", - KeyF41: "\x1b[15;6~", - KeyF42: "\x1b[17;6~", - KeyF43: "\x1b[18;6~", - KeyF44: "\x1b[19;6~", - KeyF45: "\x1b[20;6~", - KeyF46: "\x1b[21;6~", - KeyF47: "\x1b[23;6~", - KeyF48: "\x1b[24;6~", - KeyF49: "\x1bO3P", - KeyF50: "\x1bO3Q", - KeyF51: "\x1bO3R", - KeyF52: "\x1bO3S", - KeyF53: "\x1b[15;3~", - KeyF54: "\x1b[17;3~", - KeyF55: "\x1b[18;3~", - KeyF56: "\x1b[19;3~", - KeyF57: "\x1b[20;3~", - KeyF58: "\x1b[21;3~", - KeyF59: "\x1b[23;3~", - KeyF60: "\x1b[24;3~", - KeyF61: "\x1bO4P", - KeyF62: "\x1bO4Q", - KeyF63: "\x1bO4R", KeyBacktab: "\x1b[Z", + Modifiers: 1, AutoMargin: true, }) @@ -123,6 +76,7 @@ func init() { Columns: 80, Lines: 24, Colors: 256, + Bell: "\a", Clear: "\x1b[H\x1b[2J", EnterCA: "\x1b7\x1b[?47h", ExitCA: "\x1b[2J\x1b[?47l\x1b8", @@ -131,6 +85,7 @@ func init() { AttrOff: "\x1b[0m\x0f", Underline: "\x1b[4m", Bold: "\x1b[1m", + Dim: "\x1b[2m", Italic: "\x1b[3m", Blink: "\x1b[5m", Reverse: "\x1b[7m", @@ -146,7 +101,8 @@ func init() { EnableAcs: "\x1b)0", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", - Mouse: "\x1b[M", + StrikeThrough: "\x1b[9m", + Mouse: "\x1b[<", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", @@ -173,58 +129,8 @@ func init() { KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", - KeyF13: "\x1bO2P", - KeyF14: "\x1bO2Q", - KeyF15: "\x1bO2R", - KeyF16: "\x1bO2S", - KeyF17: "\x1b[15;2~", - KeyF18: "\x1b[17;2~", - KeyF19: "\x1b[18;2~", - KeyF20: "\x1b[19;2~", - KeyF21: "\x1b[20;2~", - KeyF22: "\x1b[21;2~", - KeyF23: "\x1b[23;2~", - KeyF24: "\x1b[24;2~", - KeyF25: "\x1bO5P", - KeyF26: "\x1bO5Q", - KeyF27: "\x1bO5R", - KeyF28: "\x1bO5S", - KeyF29: "\x1b[15;5~", - KeyF30: "\x1b[17;5~", - KeyF31: "\x1b[18;5~", - KeyF32: "\x1b[19;5~", - KeyF33: "\x1b[20;5~", - KeyF34: "\x1b[21;5~", - KeyF35: "\x1b[23;5~", - KeyF36: "\x1b[24;5~", - KeyF37: "\x1bO6P", - KeyF38: "\x1bO6Q", - KeyF39: "\x1bO6R", - KeyF40: "\x1bO6S", - KeyF41: "\x1b[15;6~", - KeyF42: "\x1b[17;6~", - KeyF43: "\x1b[18;6~", - KeyF44: "\x1b[19;6~", - KeyF45: "\x1b[20;6~", - KeyF46: "\x1b[21;6~", - KeyF47: "\x1b[23;6~", - KeyF48: "\x1b[24;6~", - KeyF49: "\x1bO3P", - KeyF50: "\x1bO3Q", - KeyF51: "\x1bO3R", - KeyF52: "\x1bO3S", - KeyF53: "\x1b[15;3~", - KeyF54: "\x1b[17;3~", - KeyF55: "\x1b[18;3~", - KeyF56: "\x1b[19;3~", - KeyF57: "\x1b[20;3~", - KeyF58: "\x1b[21;3~", - KeyF59: "\x1b[23;3~", - KeyF60: "\x1b[24;3~", - KeyF61: "\x1bO4P", - KeyF62: "\x1bO4Q", - KeyF63: "\x1bO4R", KeyBacktab: "\x1b[Z", + Modifiers: 1, AutoMargin: true, }) } diff --git a/terminfo/k/kterm/term.go b/terminfo/k/kterm/term.go index 7efdeb4c..34306809 100644 --- a/terminfo/k/kterm/term.go +++ b/terminfo/k/kterm/term.go @@ -42,7 +42,7 @@ func init() { KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", - KeyBackspace: "\b", + KeyBackspace: "\x7f", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1b[11~", diff --git a/terminfo/l/linux/term.go b/terminfo/l/linux/term.go index 0be62c08..8975bb38 100644 --- a/terminfo/l/linux/term.go +++ b/terminfo/l/linux/term.go @@ -6,7 +6,7 @@ import "github.com/gdamore/tcell/v2/terminfo" func init() { - // linux console + // Linux console terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "linux", Colors: 8, @@ -14,7 +14,7 @@ func init() { Clear: "\x1b[H\x1b[J", ShowCursor: "\x1b[?25h\x1b[?0c", HideCursor: "\x1b[?25l\x1b[?1c", - AttrOff: "\x1b[0;10m", + AttrOff: "\x1b[m\x0f", Underline: "\x1b[4m", Bold: "\x1b[1m", Dim: "\x1b[2m", @@ -25,9 +25,10 @@ func init() { SetFgBg: "\x1b[3%p1%d;4%p2%dm", ResetFgBg: "\x1b[39;49m", PadChar: "\x00", - AltChars: "+\x10,\x11-\x18.\x190\xdb`\x04a\xb1f\xf8g\xf1h\xb0i\xcej\xd9k\xbfl\xdam\xc0n\xc5o~p\xc4q\xc4r\xc4s_t\xc3u\xb4v\xc1w\xc2x\xb3y\xf3z\xf2{\xe3|\xd8}\x9c~\xfe", - EnterAcs: "\x1b[11m", - ExitAcs: "\x1b[10m", + AltChars: "++,,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", + EnterAcs: "\x0e", + ExitAcs: "\x0f", + EnableAcs: "\x1b)0", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", Mouse: "\x1b[M", @@ -65,7 +66,7 @@ func init() { KeyF18: "\x1b[32~", KeyF19: "\x1b[33~", KeyF20: "\x1b[34~", - KeyBacktab: "\x1b[Z", + KeyBacktab: "\x1b\t", AutoMargin: true, InsertChar: "\x1b[@", }) diff --git a/terminfo/p/pcansi/term.go b/terminfo/p/pcansi/term.go index 9e89c197..aadc8719 100644 --- a/terminfo/p/pcansi/term.go +++ b/terminfo/p/pcansi/term.go @@ -6,7 +6,7 @@ import "github.com/gdamore/tcell/v2/terminfo" func init() { - // ibm-pc terminal programs claiming to be ansi + // ibm-pc terminal programs claiming to be ANSI terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "pcansi", Columns: 80, diff --git a/terminfo/r/rxvt/term.go b/terminfo/r/rxvt/term.go index fec59e28..94169e79 100644 --- a/terminfo/r/rxvt/term.go +++ b/terminfo/r/rxvt/term.go @@ -9,6 +9,7 @@ func init() { // rxvt terminal emulator (X Window System) terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "rxvt", + Aliases: []string{"rxvt-color"}, Columns: 80, Lines: 24, Colors: 8, @@ -44,7 +45,7 @@ func init() { KeyLeft: "\x1b[D", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", - KeyBackspace: "\b", + KeyBackspace: "\x7f", KeyHome: "\x1b[7~", KeyEnd: "\x1b[8~", KeyPgUp: "\x1b[5~", @@ -109,7 +110,6 @@ func init() { KeyCtrlHome: "\x1b[7^", KeyCtrlEnd: "\x1b[8^", AutoMargin: true, - InsertChar: "\x1b[@", }) // rxvt 2.7.9 with xterm 256-colors @@ -150,7 +150,7 @@ func init() { KeyLeft: "\x1b[D", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", - KeyBackspace: "\b", + KeyBackspace: "\x7f", KeyHome: "\x1b[7~", KeyEnd: "\x1b[8~", KeyPgUp: "\x1b[5~", @@ -215,7 +215,6 @@ func init() { KeyCtrlHome: "\x1b[7^", KeyCtrlEnd: "\x1b[8^", AutoMargin: true, - InsertChar: "\x1b[@", }) // rxvt 2.7.9 with xterm 88-colors @@ -256,7 +255,7 @@ func init() { KeyLeft: "\x1b[D", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", - KeyBackspace: "\b", + KeyBackspace: "\x7f", KeyHome: "\x1b[7~", KeyEnd: "\x1b[8~", KeyPgUp: "\x1b[5~", @@ -321,7 +320,6 @@ func init() { KeyCtrlHome: "\x1b[7^", KeyCtrlEnd: "\x1b[8^", AutoMargin: true, - InsertChar: "\x1b[@", }) // rxvt-unicode terminal (X Window System) diff --git a/terminfo/s/screen/term.go b/terminfo/s/screen/term.go index 01bca4e1..b8595295 100644 --- a/terminfo/s/screen/term.go +++ b/terminfo/s/screen/term.go @@ -45,7 +45,7 @@ func init() { KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", - KeyBackspace: "\b", + KeyBackspace: "\x7f", KeyHome: "\x1b[1~", KeyEnd: "\x1b[4~", KeyPgUp: "\x1b[5~", @@ -105,7 +105,7 @@ func init() { KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", - KeyBackspace: "\b", + KeyBackspace: "\x7f", KeyHome: "\x1b[1~", KeyEnd: "\x1b[4~", KeyPgUp: "\x1b[5~", diff --git a/terminfo/s/simpleterm/term.go b/terminfo/s/simpleterm/term.go index 301ff292..e14b265a 100644 --- a/terminfo/s/simpleterm/term.go +++ b/terminfo/s/simpleterm/term.go @@ -6,129 +6,129 @@ import "github.com/gdamore/tcell/v2/terminfo" func init() { - // simpleterm 0.4.1 + // aka simpleterm terminfo.AddTerminfo(&terminfo.Terminfo{ - Name: "st", - Aliases: []string{"stterm"}, - Columns: 80, - Lines: 24, - Colors: 8, - Bell: "\a", - Clear: "\x1b[H\x1b[2J", - EnterCA: "\x1b[?1049h", - ExitCA: "\x1b[?1049l", - ShowCursor: "\x1b[?12l\x1b[?25h", - HideCursor: "\x1b[?25l", - AttrOff: "\x1b[0m", - Underline: "\x1b[4m", - Bold: "\x1b[1m", - Italic: "\x1b[3m", - Blink: "\x1b[5m", - Reverse: "\x1b[7m", - EnterKeypad: "\x1b[?1h\x1b=", - ExitKeypad: "\x1b[?1l\x1b>", - SetFg: "\x1b[3%p1%dm", - SetBg: "\x1b[4%p1%dm", - SetFgBg: "\x1b[3%p1%d;4%p2%dm", - ResetFgBg: "\x1b[39;49m", - PadChar: "\x00", - AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", - EnterAcs: "\x1b(0", - ExitAcs: "\x1b(B", - EnableAcs: "\x1b)0", - Mouse: "\x1b[M", - SetCursor: "\x1b[%i%p1%d;%p2%dH", - CursorBack1: "\b", - CursorUp1: "\x1b[A", - KeyUp: "\x1bOA", - KeyDown: "\x1bOB", - KeyRight: "\x1bOC", - KeyLeft: "\x1bOD", - KeyInsert: "\x1b[2~", - KeyDelete: "\x1b[3~", - KeyBackspace: "\x7f", - KeyHome: "\x1b[1~", - KeyEnd: "\x1b[4~", - KeyPgUp: "\x1b[5~", - KeyPgDn: "\x1b[6~", - KeyF1: "\x1bOP", - KeyF2: "\x1bOQ", - KeyF3: "\x1bOR", - KeyF4: "\x1bOS", - KeyF5: "\x1b[15~", - KeyF6: "\x1b[17~", - KeyF7: "\x1b[18~", - KeyF8: "\x1b[19~", - KeyF9: "\x1b[20~", - KeyF10: "\x1b[21~", - KeyF11: "\x1b[23~", - KeyF12: "\x1b[24~", - KeyClear: "\x1b[3;5~", - KeyBacktab: "\x1b[Z", - Modifiers: 1, - AutoMargin: true, + Name: "st", + Aliases: []string{"stterm"}, + Columns: 80, + Lines: 24, + Colors: 8, + Bell: "\a", + Clear: "\x1b[H\x1b[2J", + EnterCA: "\x1b[?1049h", + ExitCA: "\x1b[?1049l", + ShowCursor: "\x1b[?25h", + HideCursor: "\x1b[?25l", + AttrOff: "\x1b[0m", + Underline: "\x1b[4m", + Bold: "\x1b[1m", + Dim: "\x1b[2m", + Italic: "\x1b[3m", + Blink: "\x1b[5m", + Reverse: "\x1b[7m", + EnterKeypad: "\x1b[?1h\x1b=", + ExitKeypad: "\x1b[?1l\x1b>", + SetFg: "\x1b[3%p1%dm", + SetBg: "\x1b[4%p1%dm", + SetFgBg: "\x1b[3%p1%d;4%p2%dm", + ResetFgBg: "\x1b[39;49m", + AltChars: "+C,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", + EnterAcs: "\x1b(0", + ExitAcs: "\x1b(B", + EnableAcs: "\x1b)0", + StrikeThrough: "\x1b[9m", + Mouse: "\x1b[M", + SetCursor: "\x1b[%i%p1%d;%p2%dH", + CursorBack1: "\b", + CursorUp1: "\x1b[A", + KeyUp: "\x1bOA", + KeyDown: "\x1bOB", + KeyRight: "\x1bOC", + KeyLeft: "\x1bOD", + KeyInsert: "\x1b[2~", + KeyDelete: "\x1b[3~", + KeyBackspace: "\x7f", + KeyHome: "\x1b[1~", + KeyEnd: "\x1b[4~", + KeyPgUp: "\x1b[5~", + KeyPgDn: "\x1b[6~", + KeyF1: "\x1bOP", + KeyF2: "\x1bOQ", + KeyF3: "\x1bOR", + KeyF4: "\x1bOS", + KeyF5: "\x1b[15~", + KeyF6: "\x1b[17~", + KeyF7: "\x1b[18~", + KeyF8: "\x1b[19~", + KeyF9: "\x1b[20~", + KeyF10: "\x1b[21~", + KeyF11: "\x1b[23~", + KeyF12: "\x1b[24~", + KeyClear: "\x1b[3;5~", + Modifiers: 1, + AutoMargin: true, }) // simpleterm with 256 colors terminfo.AddTerminfo(&terminfo.Terminfo{ - Name: "st-256color", - Aliases: []string{"stterm-256color"}, - Columns: 80, - Lines: 24, - Colors: 256, - Bell: "\a", - Clear: "\x1b[H\x1b[2J", - EnterCA: "\x1b[?1049h", - ExitCA: "\x1b[?1049l", - ShowCursor: "\x1b[?12l\x1b[?25h", - HideCursor: "\x1b[?25l", - AttrOff: "\x1b[0m", - Underline: "\x1b[4m", - Bold: "\x1b[1m", - Italic: "\x1b[3m", - Blink: "\x1b[5m", - Reverse: "\x1b[7m", - EnterKeypad: "\x1b[?1h\x1b=", - ExitKeypad: "\x1b[?1l\x1b>", - SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m", - SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m", - SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m", - ResetFgBg: "\x1b[39;49m", - PadChar: "\x00", - AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", - EnterAcs: "\x1b(0", - ExitAcs: "\x1b(B", - EnableAcs: "\x1b)0", - Mouse: "\x1b[M", - SetCursor: "\x1b[%i%p1%d;%p2%dH", - CursorBack1: "\b", - CursorUp1: "\x1b[A", - KeyUp: "\x1bOA", - KeyDown: "\x1bOB", - KeyRight: "\x1bOC", - KeyLeft: "\x1bOD", - KeyInsert: "\x1b[2~", - KeyDelete: "\x1b[3~", - KeyBackspace: "\x7f", - KeyHome: "\x1b[1~", - KeyEnd: "\x1b[4~", - KeyPgUp: "\x1b[5~", - KeyPgDn: "\x1b[6~", - KeyF1: "\x1bOP", - KeyF2: "\x1bOQ", - KeyF3: "\x1bOR", - KeyF4: "\x1bOS", - KeyF5: "\x1b[15~", - KeyF6: "\x1b[17~", - KeyF7: "\x1b[18~", - KeyF8: "\x1b[19~", - KeyF9: "\x1b[20~", - KeyF10: "\x1b[21~", - KeyF11: "\x1b[23~", - KeyF12: "\x1b[24~", - KeyClear: "\x1b[3;5~", - KeyBacktab: "\x1b[Z", - Modifiers: 1, - AutoMargin: true, + Name: "st-256color", + Aliases: []string{"stterm-256color"}, + Columns: 80, + Lines: 24, + Colors: 256, + Bell: "\a", + Clear: "\x1b[H\x1b[2J", + EnterCA: "\x1b[?1049h", + ExitCA: "\x1b[?1049l", + ShowCursor: "\x1b[?25h", + HideCursor: "\x1b[?25l", + AttrOff: "\x1b[0m", + Underline: "\x1b[4m", + Bold: "\x1b[1m", + Dim: "\x1b[2m", + Italic: "\x1b[3m", + Blink: "\x1b[5m", + Reverse: "\x1b[7m", + EnterKeypad: "\x1b[?1h\x1b=", + ExitKeypad: "\x1b[?1l\x1b>", + SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m", + SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m", + SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m", + ResetFgBg: "\x1b[39;49m", + AltChars: "+C,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", + EnterAcs: "\x1b(0", + ExitAcs: "\x1b(B", + EnableAcs: "\x1b)0", + StrikeThrough: "\x1b[9m", + Mouse: "\x1b[M", + SetCursor: "\x1b[%i%p1%d;%p2%dH", + CursorBack1: "\b", + CursorUp1: "\x1b[A", + KeyUp: "\x1bOA", + KeyDown: "\x1bOB", + KeyRight: "\x1bOC", + KeyLeft: "\x1bOD", + KeyInsert: "\x1b[2~", + KeyDelete: "\x1b[3~", + KeyBackspace: "\x7f", + KeyHome: "\x1b[1~", + KeyEnd: "\x1b[4~", + KeyPgUp: "\x1b[5~", + KeyPgDn: "\x1b[6~", + KeyF1: "\x1bOP", + KeyF2: "\x1bOQ", + KeyF3: "\x1bOR", + KeyF4: "\x1bOS", + KeyF5: "\x1b[15~", + KeyF6: "\x1b[17~", + KeyF7: "\x1b[18~", + KeyF8: "\x1b[19~", + KeyF9: "\x1b[20~", + KeyF10: "\x1b[21~", + KeyF11: "\x1b[23~", + KeyF12: "\x1b[24~", + KeyClear: "\x1b[3;5~", + Modifiers: 1, + AutoMargin: true, }) } diff --git a/terminfo/t/tmux/term.go b/terminfo/t/tmux/term.go index c42a9d67..5ecac38e 100644 --- a/terminfo/t/tmux/term.go +++ b/terminfo/t/tmux/term.go @@ -8,62 +8,64 @@ func init() { // tmux terminal multiplexer terminfo.AddTerminfo(&terminfo.Terminfo{ - Name: "tmux", - Columns: 80, - Lines: 24, - Colors: 8, - Bell: "\a", - Clear: "\x1b[H\x1b[J", - EnterCA: "\x1b[?1049h", - ExitCA: "\x1b[?1049l", - ShowCursor: "\x1b[34h\x1b[?25h", - HideCursor: "\x1b[?25l", - AttrOff: "\x1b[m\x0f", - Underline: "\x1b[4m", - Bold: "\x1b[1m", - Dim: "\x1b[2m", - Italic: "\x1b[3m", - Blink: "\x1b[5m", - Reverse: "\x1b[7m", - EnterKeypad: "\x1b[?1h\x1b=", - ExitKeypad: "\x1b[?1l\x1b>", - SetFg: "\x1b[3%p1%dm", - SetBg: "\x1b[4%p1%dm", - SetFgBg: "\x1b[3%p1%d;4%p2%dm", - ResetFgBg: "\x1b[39;49m", - PadChar: "\x00", - AltChars: "++,,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", - EnterAcs: "\x0e", - ExitAcs: "\x0f", - EnableAcs: "\x1b(B\x1b)0", - Mouse: "\x1b[M", - SetCursor: "\x1b[%i%p1%d;%p2%dH", - CursorBack1: "\b", - CursorUp1: "\x1bM", - KeyUp: "\x1bOA", - KeyDown: "\x1bOB", - KeyRight: "\x1bOC", - KeyLeft: "\x1bOD", - KeyInsert: "\x1b[2~", - KeyDelete: "\x1b[3~", - KeyBackspace: "\b", - KeyHome: "\x1b[1~", - KeyEnd: "\x1b[4~", - KeyPgUp: "\x1b[5~", - KeyPgDn: "\x1b[6~", - KeyF1: "\x1bOP", - KeyF2: "\x1bOQ", - KeyF3: "\x1bOR", - KeyF4: "\x1bOS", - KeyF5: "\x1b[15~", - KeyF6: "\x1b[17~", - KeyF7: "\x1b[18~", - KeyF8: "\x1b[19~", - KeyF9: "\x1b[20~", - KeyF10: "\x1b[21~", - KeyF11: "\x1b[23~", - KeyF12: "\x1b[24~", - KeyBacktab: "\x1b[Z", - AutoMargin: true, + Name: "tmux", + Columns: 80, + Lines: 24, + Colors: 8, + Bell: "\a", + Clear: "\x1b[H\x1b[J", + EnterCA: "\x1b[?1049h", + ExitCA: "\x1b[?1049l", + ShowCursor: "\x1b[34h\x1b[?25h", + HideCursor: "\x1b[?25l", + AttrOff: "\x1b[m\x0f", + Underline: "\x1b[4m", + Bold: "\x1b[1m", + Dim: "\x1b[2m", + Italic: "\x1b[3m", + Blink: "\x1b[5m", + Reverse: "\x1b[7m", + EnterKeypad: "\x1b[?1h\x1b=", + ExitKeypad: "\x1b[?1l\x1b>", + SetFg: "\x1b[3%p1%dm", + SetBg: "\x1b[4%p1%dm", + SetFgBg: "\x1b[3%p1%d;4%p2%dm", + ResetFgBg: "\x1b[39;49m", + PadChar: "\x00", + AltChars: "++,,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", + EnterAcs: "\x0e", + ExitAcs: "\x0f", + EnableAcs: "\x1b(B\x1b)0", + StrikeThrough: "\x1b[9m", + Mouse: "\x1b[M", + SetCursor: "\x1b[%i%p1%d;%p2%dH", + CursorBack1: "\b", + CursorUp1: "\x1bM", + KeyUp: "\x1bOA", + KeyDown: "\x1bOB", + KeyRight: "\x1bOC", + KeyLeft: "\x1bOD", + KeyInsert: "\x1b[2~", + KeyDelete: "\x1b[3~", + KeyBackspace: "\x7f", + KeyHome: "\x1b[1~", + KeyEnd: "\x1b[4~", + KeyPgUp: "\x1b[5~", + KeyPgDn: "\x1b[6~", + KeyF1: "\x1bOP", + KeyF2: "\x1bOQ", + KeyF3: "\x1bOR", + KeyF4: "\x1bOS", + KeyF5: "\x1b[15~", + KeyF6: "\x1b[17~", + KeyF7: "\x1b[18~", + KeyF8: "\x1b[19~", + KeyF9: "\x1b[20~", + KeyF10: "\x1b[21~", + KeyF11: "\x1b[23~", + KeyF12: "\x1b[24~", + KeyBacktab: "\x1b[Z", + Modifiers: 1, + AutoMargin: true, }) } diff --git a/terminfo/v/vt100/term.go b/terminfo/v/vt100/term.go index 7f423a6b..2bad42e9 100644 --- a/terminfo/v/vt100/term.go +++ b/terminfo/v/vt100/term.go @@ -6,7 +6,7 @@ import "github.com/gdamore/tcell/v2/terminfo" func init() { - // dec vt100 (w/advanced video) + // DEC VT100 (w/advanced video) terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "vt100", Aliases: []string{"vt100-am"}, diff --git a/terminfo/v/vt102/term.go b/terminfo/v/vt102/term.go index 76ec0ebd..1269b5b7 100644 --- a/terminfo/v/vt102/term.go +++ b/terminfo/v/vt102/term.go @@ -6,7 +6,7 @@ import "github.com/gdamore/tcell/v2/terminfo" func init() { - // dec vt102 + // DEC VT102 terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "vt102", Columns: 80, diff --git a/terminfo/v/vt220/term.go b/terminfo/v/vt220/term.go index 0c49a364..a637677a 100644 --- a/terminfo/v/vt220/term.go +++ b/terminfo/v/vt220/term.go @@ -6,7 +6,7 @@ import "github.com/gdamore/tcell/v2/terminfo" func init() { - // dec vt220 + // DEC VT220 terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "vt220", Aliases: []string{"vt200"}, @@ -14,6 +14,8 @@ func init() { Lines: 24, Bell: "\a", Clear: "\x1b[H\x1b[J", + ShowCursor: "\x1b[?25h", + HideCursor: "\x1b[?25l", AttrOff: "\x1b[m\x1b(B", Underline: "\x1b[4m", Bold: "\x1b[1m", diff --git a/terminfo/v/vt320/term.go b/terminfo/v/vt320/term.go index 3129b6e3..e929ed45 100644 --- a/terminfo/v/vt320/term.go +++ b/terminfo/v/vt320/term.go @@ -6,7 +6,7 @@ import "github.com/gdamore/tcell/v2/terminfo" func init() { - // dec vt320 7 bit terminal + // DEC VT320 7 bit terminal terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "vt320", Aliases: []string{"vt300"}, diff --git a/terminfo/v/vt400/term.go b/terminfo/v/vt400/term.go index 25ca3960..05406563 100644 --- a/terminfo/v/vt400/term.go +++ b/terminfo/v/vt400/term.go @@ -6,7 +6,7 @@ import "github.com/gdamore/tcell/v2/terminfo" func init() { - // dec vt400 24x80 column autowrap + // DEC VT400 24x80 column autowrap terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "vt400", Aliases: []string{"vt400-24", "dec-vt400"}, diff --git a/terminfo/v/vt52/term.go b/terminfo/v/vt52/term.go index ba49f7f5..5d193ed7 100644 --- a/terminfo/v/vt52/term.go +++ b/terminfo/v/vt52/term.go @@ -6,13 +6,15 @@ import "github.com/gdamore/tcell/v2/terminfo" func init() { - // dec vt52 + // DEC VT52 terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "vt52", Columns: 80, Lines: 24, Bell: "\a", Clear: "\x1bH\x1bJ", + EnterKeypad: "\x1b=", + ExitKeypad: "\x1b>", PadChar: "\x00", AltChars: "+h.k0affggolpnqprrss", EnterAcs: "\x1bF", @@ -25,5 +27,13 @@ func init() { KeyRight: "\x1bC", KeyLeft: "\x1bD", KeyBackspace: "\b", + KeyF1: "\x1bP", + KeyF2: "\x1bQ", + KeyF3: "\x1bR", + KeyF5: "\x1b?t", + KeyF6: "\x1b?u", + KeyF7: "\x1b?v", + KeyF8: "\x1b?w", + KeyF9: "\x1b?x", }) } diff --git a/terminfo/w/wy50/term.go b/terminfo/w/wy50/term.go index 5b3db049..beced62d 100644 --- a/terminfo/w/wy50/term.go +++ b/terminfo/w/wy50/term.go @@ -20,7 +20,7 @@ func init() { Dim: "\x1b`7\x1b)", Reverse: "\x1b`6\x1b)", PadChar: "\x00", - AltChars: "0wa_h[jukslrmqnxqzttuyv]wpxv", + AltChars: "a;j5k3l2m1n8q:t4u9v=w0x6", EnterAcs: "\x1bH\x02", ExitAcs: "\x1bH\x03", SetCursor: "\x1b=%p1%' '%+%c%p2%' '%+%c", diff --git a/terminfo/w/wy99_ansi/term.go b/terminfo/w/wy99_ansi/term.go index 158b69d4..9b5cd7e7 100644 --- a/terminfo/w/wy99_ansi/term.go +++ b/terminfo/w/wy99_ansi/term.go @@ -6,7 +6,7 @@ import "github.com/gdamore/tcell/v2/terminfo" func init() { - // Wyse WY-99GT in ansi mode (int'l PC keyboard) + // Wyse WY-99GT in ANSI mode (int'l PC keyboard) terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "wy99-ansi", Columns: 80, @@ -62,7 +62,7 @@ func init() { AutoMargin: true, }) - // Wyse WY-99GT in ansi mode (US PC keyboard) + // Wyse WY-99GT in ANSI mode (US PC keyboard) terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "wy99a-ansi", Columns: 80, diff --git a/terminfo/x/xterm/term.go b/terminfo/x/xterm/term.go index be50c941..fb9c7589 100644 --- a/terminfo/x/xterm/term.go +++ b/terminfo/x/xterm/term.go @@ -9,13 +9,14 @@ func init() { // xterm terminal emulator (X Window System) terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "xterm", + Aliases: []string{"xterm-debian"}, Columns: 80, Lines: 24, Colors: 8, Bell: "\a", Clear: "\x1b[H\x1b[2J", - EnterCA: "\x1b[?1049h", - ExitCA: "\x1b[?1049l", + EnterCA: "\x1b[?1049h\x1b[22;0;0t", + ExitCA: "\x1b[?1049l\x1b[23;0;0t", ShowCursor: "\x1b[?12l\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b(B\x1b[m", @@ -36,7 +37,8 @@ func init() { ExitAcs: "\x1b(B", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", - Mouse: "\x1b[M", + StrikeThrough: "\x1b[9m", + Mouse: "\x1b[<", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", @@ -46,7 +48,7 @@ func init() { KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", - KeyBackspace: "\b", + KeyBackspace: "\x7f", KeyHome: "\x1bOH", KeyEnd: "\x1bOF", KeyPgUp: "\x1b[5~", @@ -76,8 +78,8 @@ func init() { Colors: 88, Bell: "\a", Clear: "\x1b[H\x1b[2J", - EnterCA: "\x1b[?1049h", - ExitCA: "\x1b[?1049l", + EnterCA: "\x1b[?1049h\x1b[22;0;0t", + ExitCA: "\x1b[?1049l\x1b[23;0;0t", ShowCursor: "\x1b[?12l\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b(B\x1b[m", @@ -98,7 +100,8 @@ func init() { ExitAcs: "\x1b(B", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", - Mouse: "\x1b[M", + StrikeThrough: "\x1b[9m", + Mouse: "\x1b[<", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", @@ -108,7 +111,7 @@ func init() { KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", - KeyBackspace: "\b", + KeyBackspace: "\x7f", KeyHome: "\x1bOH", KeyEnd: "\x1bOF", KeyPgUp: "\x1b[5~", @@ -138,8 +141,8 @@ func init() { Colors: 256, Bell: "\a", Clear: "\x1b[H\x1b[2J", - EnterCA: "\x1b[?1049h", - ExitCA: "\x1b[?1049l", + EnterCA: "\x1b[?1049h\x1b[22;0;0t", + ExitCA: "\x1b[?1049l\x1b[23;0;0t", ShowCursor: "\x1b[?12l\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b(B\x1b[m", @@ -160,7 +163,8 @@ func init() { ExitAcs: "\x1b(B", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", - Mouse: "\x1b[M", + StrikeThrough: "\x1b[9m", + Mouse: "\x1b[<", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", @@ -170,7 +174,7 @@ func init() { KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", - KeyBackspace: "\b", + KeyBackspace: "\x7f", KeyHome: "\x1bOH", KeyEnd: "\x1bOF", KeyPgUp: "\x1b[5~",