Skip to content

Add configurable input status hints - #1188

Open
hitsmaxft wants to merge 1 commit into
rime:masterfrom
hitsmaxft:feature/modifier-key-hint
Open

hitsmaxft wants to merge 1 commit into
rime:masterfrom
hitsmaxft:feature/modifier-key-hint

Conversation

@hitsmaxft

@hitsmaxft hitsmaxft commented Oct 13, 2026 •

Copy link
Copy Markdown

Extend the existing input status panel with opt-in modifier and focus hints. In non-ASCII mode, focusing a text field shows the active schema name until the first keydown or a configurable timeout (2 seconds by default). Held Control/Option/Shift/Command keys remain visible while pressed. When name hints are enabled, switching back to non-ASCII mode also shows the active schema name instead of the usual Chinese-mode label; the English-mode label is preserved.

Both features default off. Enable them in squirrel.custom.yaml and redeploy:

patch:
  "modifier_hint/show": true
  "focus_hint/show": true
  "focus_hint/duration": 2

All hints share the existing Chinese/English status component and use the candidate font and theme. No extra window or font option is introduced. With candidates visible, modifier hints appear in a status row below the candidates, outside candidate hit testing. Status-message expiry clears only the notification, preserving held-key indicators.

The implementation separates transient state from rendering, polls only while input hints are visible, and clears them on deactivation or input-source changes. README documents configuration and client requirements. CI runs the standalone state tests on feature branches containing slashes.

Validation:

  • Local state tests and Swift type checking passed. Tests cover all modifier combinations, focus timeout/dismissal, ASCII-mode suppression, notification expiry, and message deduplication.
  • Fork CI passed: state tests, SwiftLint, universal Xcode build, installer packaging, and unused-code scan.
  • The merged-panel version was installed on macOS. The updated mode-switch name label awaits another UI check.

Hints require valid client-provided caret geometry and input activation callbacks. Modifier indicators exclude Caps Lock and Fn.

@hitsmaxft hitsmaxft changed the title Add optional caret hints for modifiers and the active input schema Integrate optional modifier and focus hints into the status panel Oct 13, 2026
Reuse the existing candidate/status panel for modifier-key indicators and active-schema names. Keep both features opt-in, use candidate fonts and themes, and dismiss focus names on typing or timeout. Show the schema name when switching back to non-ASCII mode if name hints are enabled.

Document configuration and cover hint/message state with standalone tests.
@hitsmaxft
hitsmaxft force-pushed the feature/modifier-key-hint branch from 834af60 to 4d42871 Compare October 13, 2026 09:35
@hitsmaxft hitsmaxft changed the title Integrate optional modifier and focus hints into the status panel Add configurable input status hints Oct 13, 2026
@hitsmaxft
hitsmaxft marked this pull request as ready for review October 15, 2026 03:23
@hitsmaxft

Copy link
Copy Markdown
Author
图片

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant