plover icon indicating copy to clipboard operation
plover copied to clipboard

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

Open casperdewith opened this issue 2 years ago • 2 comments

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.

casperdewith avatar Nov 30 '23 16:11 casperdewith

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

user202729 avatar Dec 01 '23 09:12 user202729

You mentioned metas and macros. Perhaps it’s implementable with those, similar to the all-uppercase mode. Then, an ASCII-only mode can be just a plugin.


From: user202729 @.> Sent: Friday, December 1, 2023 10:05:36 AM To: openstenoproject/plover @.> Cc: casperdewith @.>; Author @.> Subject: Re: [openstenoproject/plover] customisable character-replacement modes, e.g. ASCII-only (Issue #1646)

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

— Reply to this email directly, view it on GitHubhttps://github.com/openstenoproject/plover/issues/1646#issuecomment-1835726112, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AILDOJAZ2AUIVM4EA2MDUJTYHGMWBAVCNFSM6AAAAABABN4FKWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZVG4ZDMMJRGI. You are receiving this because you authored the thread.Message ID: @.***>

casperdewith avatar Dec 01 '23 12:12 casperdewith