Add wtype_shift_prefix option to fix CJK first character drop#208
Open
peteonrails wants to merge 1 commit intomainfrom
Open
Add wtype_shift_prefix option to fix CJK first character drop#208peteonrails wants to merge 1 commit intomainfrom
peteonrails wants to merge 1 commit intomainfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
wtype_shift_prefixopt-in config flag (defaultfalse) 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--wtype-shift-prefixCLI flag, andVOXTYPE_WTYPE_SHIFT_PREFIXenv varCloses #202
Test plan
cargo testpasses (all wtype and config tests, including newtest_new_with_shift_prefix)cargo clippyclean (no new warnings)wtype_shift_prefix = true, verify wtype command includes-P Shift_L -p Shift_Lin debug logs (voxtype -vv)