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

@@ -46,7 +46,7 @@ Edit directly or use `/settings` for common options.
| `treeFilterMode` | string | `"default"` | Default filter for `/tree`: `"default"`, `"no-tools"`, `"user-only"`, `"labeled-only"`, `"all"` |
| `editorPaddingX` | number | `0` | Horizontal padding for input editor (0-3) |
| `autocompleteMaxVisible` | number | `5` | Max visible items in autocomplete dropdown (3-20) |
| `showHardwareCursor` | boolean | `false` | Show terminal cursor |
| `showHardwareCursor` | boolean | `false` | Show the terminal cursor while TUI positions it for IME support |
### Telemetry and update checks

View File

@@ -49,6 +49,8 @@ config.enable_kitty_keyboard = true
return config
```
On WSL, WezTerm may require a visible hardware cursor for IME candidate window positioning. If CJK IME candidates do not follow the text cursor, set `PI_HARDWARE_CURSOR=1` before running pi or set `showHardwareCursor` to `true` in settings.
## VS Code (Integrated Terminal)
`keybindings.json` locations:

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