diff options
| author | Dax Raad <[email protected]> | 2025-11-02 18:43:17 -0500 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-11-02 18:43:33 -0500 |
| commit | f68374ad2223ddc213bdea9519ca6a699819ee0e (patch) | |
| tree | 04f0fe21b8e12cd62d7274961bb0cff64f966f40 /packages/tui/input/xterm.go | |
| parent | 5e86c9b7916f75c7ad227b80eab18c7c54fc8ffe (diff) | |
| download | opencode-f68374ad2223ddc213bdea9519ca6a699819ee0e.tar.gz opencode-f68374ad2223ddc213bdea9519ca6a699819ee0e.zip | |
DELETE GO BUBBLETEA CRAP HOORAY
Diffstat (limited to 'packages/tui/input/xterm.go')
| -rw-r--r-- | packages/tui/input/xterm.go | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/packages/tui/input/xterm.go b/packages/tui/input/xterm.go deleted file mode 100644 index b3bbc3083..000000000 --- a/packages/tui/input/xterm.go +++ /dev/null @@ -1,47 +0,0 @@ -package input - -import ( - "github.com/charmbracelet/x/ansi" -) - -func parseXTermModifyOtherKeys(params ansi.Params) Event { - // XTerm modify other keys starts with ESC [ 27 ; <modifier> ; <code> ~ - xmod, _, _ := params.Param(1, 1) - xrune, _, _ := params.Param(2, 1) - mod := KeyMod(xmod - 1) - r := rune(xrune) - - switch r { - case ansi.BS: - return KeyPressEvent{Mod: mod, Code: KeyBackspace} - case ansi.HT: - return KeyPressEvent{Mod: mod, Code: KeyTab} - case ansi.CR: - return KeyPressEvent{Mod: mod, Code: KeyEnter} - case ansi.ESC: - return KeyPressEvent{Mod: mod, Code: KeyEscape} - case ansi.DEL: - return KeyPressEvent{Mod: mod, Code: KeyBackspace} - } - - // CSI 27 ; <modifier> ; <code> ~ keys defined in XTerm modifyOtherKeys - k := KeyPressEvent{Code: r, Mod: mod} - if k.Mod <= ModShift { - k.Text = string(r) - } - - return k -} - -// TerminalVersionEvent is a message that represents the terminal version. -type TerminalVersionEvent string - -// ModifyOtherKeysEvent represents a modifyOtherKeys event. -// -// 0: disable -// 1: enable mode 1 -// 2: enable mode 2 -// -// See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Functions-using-CSI-_-ordered-by-the-final-character_s_ -// See: https://invisible-island.net/xterm/manpage/xterm.html#VT100-Widget-Resources:modifyOtherKeys -type ModifyOtherKeysEvent uint8 |
