From afcb99dcdcc8028bbb0f2485baf03b1c3c6b797d Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 13 Jul 2022 09:46:37 -0700 Subject: [PATCH] seqs --- docs/sequences.md | 11 +++++++++++ docs/sequences/bel.md | 24 ++++++++++++++++++++++++ docs/sequences/bs.md | 19 +++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 docs/sequences/bel.md create mode 100644 docs/sequences/bs.md diff --git a/docs/sequences.md b/docs/sequences.md index 1600ceafd..7f82aeaff 100644 --- a/docs/sequences.md +++ b/docs/sequences.md @@ -5,6 +5,17 @@ of terminal emulators and their implementation status in ghostty. Note that some control sequences may never be implemented in ghostty. In these scenarios, it is noted why. +Status meanings: + + * ✅ - Implementation is complete and considered 100% accurate. + * ⚠️ - Implementation works, but may be missing some functionality. The + details of how well it works or doesn't are in the linked page. + * ❌ - Implementation is effectively non-functional, but ghostty continues + in the face of it (probably in some broken state). + * 💥 - Ghostty crashes if this control sequence is sent. + | Seq | ASCII | Name | Status | |:---:|:-----:|:-----|:------:| | `ENQ` | `0x05` | [Enquiry](sequences/enq.md) | ✅ | +| `BEL` | `0x07` | [Bell](sequences/bel.md) | ❌ | +| `BS` | `0x08` | [Backspace](sequences/bs.md) | ⚠️ | diff --git a/docs/sequences/bel.md b/docs/sequences/bel.md new file mode 100644 index 000000000..8fec377a8 --- /dev/null +++ b/docs/sequences/bel.md @@ -0,0 +1,24 @@ +# Bell + +| | | +| --- | --- | +| Text | | +| Hex | `0x07` | + +Rings a "bell" to alert the operator to some condition. + +## Implementation Details + + * ghostty logs "BELL" + +## TODO + + * Add a configurable visuable bell -- common in most terminal emulators -- + to flash the border. + * Mark the window as requesting attention, most operating systems support + this. For example, Windows windows will flash in the toolbar. + * Support an audible bell. + +## References + + * https://vt100.net/docs/vt100-ug/chapter3.html diff --git a/docs/sequences/bs.md b/docs/sequences/bs.md new file mode 100644 index 000000000..e5a83e960 --- /dev/null +++ b/docs/sequences/bs.md @@ -0,0 +1,19 @@ +# Backspace + +| | | +| --- | --- | +| Text | | +| Hex | `0x08` | + +Move the cursor left one cell. + +TODO: Details about how this interacts with soft wrapping. + +## Implementation Details + + * ghostty implements this naively as `cursor.x -|= 1` (`-|=` being a + saturating substraction). + +## TODO + + * Soft wrap integration