Commit graph

6 commits

Author SHA1 Message Date
draw me an elephant
8b10e22689
fix: skip capability queries when input is disabled (#1801)
Co-authored-by: drew <me@andrinoff.com>
Signed-off-by: drew <me@andrinoff.com>
2026-09-24 12:05:48 +04:00
Ayman Bagabas
b947ade70d
refactor: change several message types to structs for extensibility 2025-11-04 14:01:26 -05:00
Ayman Bagabas
2df9ed00e3 refactor: use x/input for input events
This moves the existing input event handling to the x/input package. All
input events are translated to tea messages in
`tea.translateInputEvent`.
2024-12-12 10:51:58 -05:00
Ayman Bagabas
8b51296eba
feat: support terminal color profiles
This adds support for detecting the terminal's color profile. It adds a
new `ColorProfileMsg` message that get sent when the program starts. You
can force a specific color profile using the `WithColorProfile` option.

When a program requests the `RGB` or `Tc` terminfo capabilities, Bubble
Tea will read the response, if there is one, and upgrade the cached
color profile and send the new profile to the program again.

Supersedes: https://github.com/charmbracelet/bubbletea/pull/1142
Supersedes: https://github.com/charmbracelet/bubbletea/pull/1143
2024-09-16 17:35:30 -04:00
Ayman Bagabas
a6725ba1b4
fix: implement RequestCapability and unexport and remove internal messages and commands 2024-09-12 13:49:40 -04:00
Ayman Bagabas
13ffcad06c
refactor: reimplement the event loop with a sequence parser
Currently, Bubble Tea uses a simple lookup table to detect input events.
Here, we're introducing an actual input sequence parser instead of
simply using a lookup table. This will allow Bubble Tea programs to read
all sorts of input events such Kitty keyboard, background color, mode
report, and all sorts of ANSI sequence input events.

Supersedes: https://github.com/charmbracelet/bubbletea/pull/1079
Supersedes: https://github.com/charmbracelet/bubbletea/issues/1014
Related: https://github.com/charmbracelet/bubbletea/issues/869
Related: https://github.com/charmbracelet/bubbletea/issues/163
Related: https://github.com/charmbracelet/bubbletea/issues/918
Related: https://github.com/charmbracelet/bubbletea/issues/850
Related: https://github.com/charmbracelet/bubbletea/issues/207
2024-08-12 17:33:51 -04:00