• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

charmbracelet / bubbletea / 10456600237
61%
main: 72%

Build:
Build:
LAST BUILD BRANCH: windows-fkeys
DEFAULT BRANCH: main
Ran 19 Aug 2024 03:47PM UTC
Jobs 1
Files 30
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Aug 2024 03:47PM UTC coverage: 63.477% (-9.4%) from 72.923%
10456600237

push

github

web-flow
refactor: reimplement the event loop with a sequence parser (#1080)

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.

This PR includes the following changes:
- Support clipboard OSC52 read messages (`OSC 52 ?`)
- Support terminal foreground/background/cursor color report messages
(OSC10, OSC11, OSC12)
- Support terminal focus events (mode 1004)
- Deprecate the old `KeyMsg` API in favor of `KeyPressMsg` and
`KeyReleaseMsg`
- `KeyType` const values are different now. Programs that use int value
comparison **will** break. E.g. `key.Type == 13` where `13` is the
control code for `CR` that corresponds to the <kbd>enter</kbd> key.
(BREAKING CHANGE!)
- Bubble Tea will send two messages for key presses, the first of type
`KeyMsg` and the second of type `KeyPressMsg`. This is to keep backwards
compatibility and _not_ break the API
  - `tea.Key` contains breaking changes (BREAKING CHANGE!)
- Deprecate `MouseMsg` in favor of `MouseClickMsg`, `MouseReleaseMsg`,
`MouseWheelMsg`, and `MouseMotionMsg`
- Bubble Tea will send two messages for mouse clicks, releases, wheel,
and motion. The first message will be a `MouseMsg` type. And the second
will have the new corresponding type. This is to keep backwards
compatibility and _not_ break the API
  - `tea.Mouse` contains breaking changes (BREAKING CHANGE!)
- Support reading Kitty keyboard reports (reading the results of sending
`CSI ? u` to the terminal)
- Support reading Kitty keyboard and fixterms keys `CSI u`
- Support reading terminal mode reports (DECRPM)
- Bracketed-paste messages now have their own message type `PasteMsg`.
Use `PasteStartMsg` and `PasteEndMsg` to listen to the start/end of the
past... (continued)

1229 of 1975 new or added lines in 23 files covered. (62.23%)

5 existing lines in 2 files now uncovered.

1997 of 3146 relevant lines covered (63.48%)

241.78 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
3
0.0
clipboard.go
4
80.0
xterm.go
5
41.67
0.0% screen.go
6
33.33
input.go
8
88.41
driver.go
9
0.0
da1.go
9
74.62
0.32% tea.go
16
95.31
table.go
19
65.15
-29.09% key.go
25
0.0
key_deprecated.go
27
35.71
color.go
29
0.0
termcap.go
42
0.0
mouse_deprecated.go
62
74.27
terminfo.go
78
42.25
-13.75% tty.go
98
0.0
kitty.go
141
0.0
win32input.go
165
71.35
parse.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
74.62
0.32% tea.go
4
65.15
-29.09% key.go
Jobs
ID Job ID Ran Files Coverage
1 10456600237.1 19 Aug 2024 03:47PM UTC 30
63.48
GitHub Action Run
Source Files on build 10456600237
  • Tree
  • List 30
  • Changed 7
  • Source Changed 0
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 0c1a6a4b on github
  • Prev Build on master (#10359319750)
  • Next Build on master (#10456611008)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc