Skip to content

Add wtype_shift_prefix option to fix CJK first character drop#208

Open
peteonrails wants to merge 1 commit intomainfrom
fix/wtype-cjk-shift-prefix
Open

Add wtype_shift_prefix option to fix CJK first character drop#208
peteonrails wants to merge 1 commit intomainfrom
fix/wtype-cjk-shift-prefix

Conversation

@peteonrails
Copy link
Owner

Summary

  • Adds wtype_shift_prefix opt-in config flag (default false) that prefixes wtype output with a Shift key press/release (-P Shift_L -p Shift_L), preventing the first CJK character from being dropped in apps like Discord
  • Configurable via config file, --wtype-shift-prefix CLI flag, and VOXTYPE_WTYPE_SHIFT_PREFIX env var
  • Updates user manual, configuration reference, and troubleshooting docs

Closes #202

Test plan

  • cargo test passes (all wtype and config tests, including new test_new_with_shift_prefix)
  • cargo clippy clean (no new warnings)
  • Manual test: enable wtype_shift_prefix = true, verify wtype command includes -P Shift_L -p Shift_L in debug logs (voxtype -vv)
  • Manual test: verify CJK text output in Discord with the flag enabled
  • Manual test: verify non-CJK text is unaffected with the flag enabled

Some apps (notably Discord) drop the first CJK character when wtype
types text. Prefixing wtype output with a Shift key press/release
(-P Shift_L -p Shift_L) prevents the character from being swallowed.

Add wtype_shift_prefix as an opt-in config flag (default false),
configurable via config file, CLI flag, and environment variable.
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.

[Bug] Workaround for missing first CJK character with wtype in Discord

1 participant