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

Add optional modifier-key and active-schema hints to the existing input status panel. Both default off and reuse candidate fonts and themes. The schema name appears on non-ASCII focus, disappears on typing or timeout, and replaces the Chinese-mode label when name hints are enabled.

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

The implementation is event-driven. Modifier state follows IMK key/flags events; focus expiry uses one cancellable, non-repeating timer. Existing Rime status reads supply mode changes. No input-source, modifier or caret polling remains.

Options are cached when settings load. With both hints off, the runtime and presenter are absent: no hint dependencies, state/caret queries, timer scheduling or hint rendering; only cached optional checks remain. The original status formatting, rendering and lifecycle are retained for this path. Disabling cancels existing work and clears hints. Closing the menu-bar icon also skips its label reads and main-queue dispatch.

Validation:

  • 10,000 simulated disabled event sequences: 0 dependency constructions, 0 provider reads, 0 timer schedules, 0 renders.
  • Enabled-mode tests cover single-shot expiry, custom duration, typing/mode/blur cancellation, and modifier-only operation without a focus read or timer.
  • Local Swift type checking passed; disabled-path status formatting/rendering were compared with upstream source.
  • Full fork CI passed: tests, SwiftLint, universal build, packaging and Periphery. The application sources are unchanged from this run; its validation workflow is excluded from this PR.
  • Manual UI acceptance of the optimized revision is pending.

README documents setup and event behavior. Hints require client-provided activation and valid caret geometry; missed modifier-release events are resynchronized by the next keyboard/focus event. Caps Lock and Fn are excluded.

@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
@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
图片

@lotem

lotem commented Oct 18, 2026

Copy link
Copy Markdown
Member

很酷很有創意。可是有無實用價值?

用性能換小玩具,推給用戶須謹慎。

@hitsmaxft

Copy link
Copy Markdown
Author

很酷很有創意。可是有無實用價值?

用性能換小玩具,推給用戶須謹慎。

因为我是vim用户, 经常受到中英文输入状态的困扰, 没有输入状态栏会影响使用.
如果不作为功能添加, 是否可以改成增加一种hook 扩展机制, 自行定制这块的行为?

@lotem

lotem commented Oct 19, 2026

Copy link
Copy Markdown
Member

看輸入狀態可以試試這項新功能:
#1122

@lotem

lotem commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

後端功能 librime 插件可以提供擴展;前端代碼由 @LEOYoon-Tsaw 重寫後,我不熟悉;如何設計前端功能擴展點,還沒有清晰思路。

目前的代碼改動看上去還不能清晰地分解開,提取模塊,能否關閉乾淨都不敢保證。所以不敢輕易上馬。

@hitsmaxft
hitsmaxft force-pushed the feature/modifier-key-hint branch 2 times, most recently from de12448 to 250e5c7 Compare October 21, 2026 10:01
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 250e5c7 to 509f017 Compare October 22, 2026 03:31
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.

2 participants