mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 04:55:58 +03:00
[PR #676] [MERGED] feat: Added HoverCursorStyle to APIs using OSC 22 #704
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#704
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/676
Author: @viralcodex
Created: 2/12/2026
Status: ✅ Merged
Merged: 2/16/2026
Merged by: @kommander
Base:
main← Head:hover-cursor-style📝 Commits (10+)
aefcb7cAdded HoverCursorStyle to APIs using OSC 22aee4b52Merge branch 'main' into hover-cursor-style6e6d3c5fix(tests): add newline at end of hover-cursor.test.ts27136ceMerge branch 'hover-cursor-style' of https://github.com/viralcodex/opentui into hover-cursor-stylebd1e82bMerge branch 'main' into hover-cursor-stylee970ce3Merge branch 'main' into hover-cursor-style8bf24abrefactor: removed hoverCursorStyle and updated cursor handling in renderera737cedrefactor: clean up imports and formatting in types and zig files62a05a7Merge branch 'main' into hover-cursor-style16f0117refactor: remove hover cursor demo example and related functionality📊 Changes
11 files changed (+232 additions, -58 deletions)
View changed files
📝
packages/core/src/examples/opentui-demo.ts(+1 -1)📝
packages/core/src/renderables/EditBufferRenderable.ts(+2 -4)📝
packages/core/src/renderer.ts(+15 -14)➕
packages/core/src/tests/hover-cursor.test.ts(+98 -0)📝
packages/core/src/types.ts(+8 -3)📝
packages/core/src/zig-structs.ts(+15 -0)📝
packages/core/src/zig.ts(+32 -18)📝
packages/core/src/zig/ansi.zig(+5 -0)📝
packages/core/src/zig/lib.zig(+25 -6)📝
packages/core/src/zig/renderer.zig(+7 -12)📝
packages/core/src/zig/terminal.zig(+24 -0)📄 Description
Fixes: #611
Hi @kommander,
Added Custom cursor styles for the openTUI API through MouseCursorStyle.
Includes: pointer, disabled, crosshair, and move.
Used OSC 22 and demo-ed on kitty terminal.
I have added all of them for usage (and future usage) but I can remove them if needed.
Child elements can override the parent hoverCursorStyle.
Also on shutdown the states reset to default cursors (added shutdown code in both native and typescript code)
https://github.com/user-attachments/assets/c877730f-bada-453a-a6ee-a95f82e47bf2
Let me know if changes are needed, will do accordingly.
Thanks :)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.