Commit graph

39 commits

Author SHA1 Message Date
deepakganesh78
0d3e281d14
fix: restore kitty keyboard stack on exit (#1750)
Co-authored-by: drew <me@andrinoff.com>
Signed-off-by: drew <me@andrinoff.com>
2026-08-19 15:56:33 +04:00
Ayman Bagabas
1ed724a2d1
chore: bump ultraviolet to v0.0.0-20260413211237-bd52878bcec2 2026-04-13 17:13:18 -04:00
Ayman Bagabas
d1ec9826ad chore(tests): update testdata 2026-04-13 10:29:11 -04:00
Ayman Bagabas
742b944f78
feat(render): enable Unicode mode (2027) for accurate width calculation (#1584)
When the terminal supports it, we now enable Unicode mode (ANSI mode
2027) to ensure accurate width calculation for wide characters and
emojis. This improves rendering fidelity in terminals that support this
mode.
2026-02-13 15:36:47 +03:00
Ayman Bagabas
6595041da2
fix(renderer): no need to enable both modifyOtherKeys protocols 2026-02-10 15:14:14 +03:00
Ayman Bagabas
9155c16141
chore: update testdata to reflect modifyOtherKeys mode 1 and 2 changes 2026-02-09 10:45:27 +03:00
Erik St. Martin
724479d6d5
feat(renderer): add modifyOtherKeys support (#1579)
Modified keys (shift+enter, ctrl+i, etc.) don't work in tmux because
tmux doesn't support the Kitty keyboard protocol. tmux requires
applications to request extended-keys using modifyOtherKeys (CSI > 4 ; 2 m).

The workaround is setting 'extended-keys always' in tmux config (tmux 3.2+),
but users may not know this is the issue, and forcing extended-keys for all
applications may not be desired. This fix sends modifyOtherKeys requests
alongside Kitty protocol sequences, enabling proper key handling in tmux
automatically.
2026-02-09 09:56:52 +03:00
Ayman Bagabas
59807cf07c
fix(renderer): reset kitty keyboard protocol on alt screen switch (#1554)
* fix(renderer): reset kitty keyboard protocol on alt screen switch

We need to reset the kitty keyboard protocol when switching between main
and alt screens. This is because kitty maintains separate keyboard
protocol registries for each screen, and failing to reset the protocol
can lead to issues such as the inability to use the Ctrl key in some
editor that don't support kitty's keyboard protocol.

* chore: update golden files to match the renderer output
2025-12-10 15:37:12 -05:00
Ayman Bagabas
6483c7e3ae
chore(tests): update golden files 2025-11-16 14:55:49 -05:00
Ayman Bagabas
a74936a850
chore(tests): fix tests and update testdata 2025-11-13 14:46:50 -05:00
Ayman Bagabas
4accb1c4d5 fix: renderer: avoid requesting keyboard enhancements on close
When the renderer is being closed, we should avoid requesting kitty
keyboard enhancements so that we don't leave the terminal with unhandled
input sequences.
2025-10-30 14:37:41 -04:00
Ayman Bagabas
72ca5f4e6b
chore: update golden files
Related: fa36fb177e
Related: d7c95b8a27
2025-10-30 12:47:01 -04:00
Ayman Bagabas
b958dc7e24
chore: update testdata 2025-10-01 13:59:10 -04:00
Ayman Bagabas
d5cd60ba8e
chore: update testdata 2025-10-01 13:50:42 -04:00
Ayman Bagabas
bd747e7bfa
refactor: clean up redundant code and update testdata 2025-10-01 13:50:38 -04:00
Ayman Bagabas
0ee1cf13c9
refactor: move key enhancement logic and options to View struct 2025-10-01 13:50:38 -04:00
Ayman Bagabas
fb3e0a4a3e
refactor: lean more into the View struct to manage terminal state 2025-10-01 13:50:37 -04:00
Ayman Bagabas
816d7bb97b
chore: fix and unify screen testdata 2025-09-11 15:09:23 -04:00
Ayman Bagabas
d6c0563d7c chore: tests: update testdata for windows 2025-07-16 14:59:50 -04:00
Ayman Bagabas
e58f3ca111
chore: tests: update golden files for the new renderer 2025-07-16 13:27:34 -04:00
Ayman Bagabas
426ab75fdc chore: update windows testdata 2025-04-30 16:44:19 -04:00
Ayman Bagabas
44861272f6
chore: update testdata 2025-05-01 11:57:18 -04:00
Ayman Bagabas
968788c69e
chore: update testdata for windows 2025-05-01 11:53:11 -04:00
Ayman Bagabas
9ca521a869
chore: update testdata 2025-05-01 11:53:10 -04:00
Ayman Bagabas
cc204f668b
(v2) fix: windows: enable mouse mode on demand (#1341)
* fix: windows: enable mouse mode on demand

This fixes an issue where mouse mode is always enabled on Windows. With
this patch, we enable mouse events only it is requested.

Needs: https://github.com/charmbracelet/x/pull/386
Related: https://github.com/charmbracelet/bubbletea/issues/1313

* refactor: mouse: properly handle mouse mode

Since mouse mode has a special case on Windows, we now have
separate msg types for mouse events.

* chore: go mod tidy
2025-03-11 16:20:20 -04:00
Ayman Bagabas
3d90f40a17 chore: update testdata for windows 2025-02-13 11:57:41 -05:00
Ayman Bagabas
3fc1c224d4
chore: merge branch 'main' into v2-exp 2025-02-12 17:03:48 -05:00
Carlos Alexandro Becker
11e96ff549
feat(v2): update examples (#1318) 2025-02-11 13:42:47 -03:00
Ayman Bagabas
47166e9a7a
chore: remove trailing newlines and update testdata
The new renderer now always moves the cursor to the beginning of
the next line on exit.
2025-02-10 17:02:33 -05:00
Ayman Bagabas
b08648f203 fix: tests: update testclearmsg test on windows and update deps 2025-02-06 16:32:09 -05:00
Ayman Bagabas
cd30b7d2ac
fix: tests: kitty_start_windows testdata 2025-02-06 13:46:10 -05:00
Ayman Bagabas
624879efac
fix: cursor show/hide sequence in test 2025-02-06 13:37:38 -05:00
Ayman Bagabas
5a2a4f72df
chore: update golden files 2025-02-04 16:52:39 -05:00
Ayman Bagabas
5388894ba5
chore: update golden file
Fixes: 51536c04b0 (fix: renderer: make sure to move the cursor to the top left corner after clearing the screen)
2025-02-03 10:47:14 -05:00
Ayman Bagabas
6f40250d70
chore: merge branch 'v2-exp' into v2-enh-keeb 2025-01-15 15:35:14 +03:00
Carlos Alexandro Becker
30a5dd4e34
Merge remote-tracking branch 'origin/v2-exp' into v2-ferocious2
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-01-14 16:52:38 -03:00
Ayman Bagabas
e2768ff843
chore: testdata: update golden files 2025-01-13 09:57:44 +03:00
Ayman Bagabas
3d79aff7ed
perf: only reset mouse modes that are set 2025-01-13 08:20:24 +03:00
Ayman Bagabas
26be4d4138
feat: tests: use golden files to test screen sequences 2025-01-13 08:20:20 +03:00