Clarify hardware cursor docs

closes #5200
This commit is contained in:
Mario Zechner
2026-05-30 01:20:01 +02:00
parent cfefc30cf1
commit c1633e609d
6 changed files with 9 additions and 5 deletions

View File

@@ -50,9 +50,9 @@ When a `Focusable` component has focus, TUI:
1. Sets `focused = true` on the component
2. Scans rendered output for `CURSOR_MARKER` (a zero-width APC escape sequence)
3. Positions the hardware terminal cursor at that location
4. Shows the hardware cursor
4. Shows the hardware cursor only when `showHardwareCursor` is enabled
This enables IME candidate windows to appear at the correct position for CJK input methods. The `Editor` and `Input` built-in components already implement this interface.
The cursor remains hidden by default. This keeps the fake cursor rendering, while still positioning the hardware cursor for terminals that track IME candidate windows with hidden cursors. Some terminals require a visible hardware cursor for IME positioning; enable it with `showHardwareCursor`, `setShowHardwareCursor(true)`, or `PI_HARDWARE_CURSOR=1`. The `Editor` and `Input` built-in components already implement this interface.
### Container Components with Embedded Inputs