Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

customisable character-replacement modes, e.g. ASCII-only #1646

Open
casperdewith opened this issue Nov 30, 2023 · 2 comments
Open

customisable character-replacement modes, e.g. ASCII-only #1646

casperdewith opened this issue Nov 30, 2023 · 2 comments

Comments

@casperdewith
Copy link

request

A mode that replaces certain single characters (or character combinations, if that’s doable at run-time) by certain strings, right before they are output. This mode can be toggled on or off with a dictionary entry.

examples

When using Plover in an application that does not support all Unicode characters, a user could enable an ASCII-only mode that they might have defined as follows:

  • (en dash) becomes --
  • (ellipsis) becomes ...
  •   (no-break space) becomes (space)
  • ĉ becomes cx
  • ế becomes e^'
  • etc.

alternatives

The alternative would be to define an entire new dictionary with all the ASCII characters filtered out. This is not ideal.

implementation ideas

I don’t know yet where this should be implemented. Perhaps in the system. Or in a whole new place. Since the user needs to be able to toggle the character-replacement layer with a dictionary entry, the mode might need to be defined as a macro.

@user202729
Copy link
Member

You can already implement it with https://pypi.org/project/plover-dict-commands/ ? You need to do it per entry though.

@casperdewith
Copy link
Author

casperdewith commented Dec 1, 2023 via email

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

No branches or pull requests

2 participants