openstenoproject/plover

Add a {plover:cycle} (and {plover:cycle_back}) command to allow users define dictionaries with multiple words for the same stroke.

Opened this issue · 2 comments

Is your feature request related to a problem? Please describe.
There are cases where a single stroke is a perfect match for typing multiple words.
Right now we use ~ and/or * to resolve this problem. Maybe in English language this is sufficient,
but for example in Polish language on accasion you can get more than 4 words matching a given stroke. In that case using just ~ and * won't be enough.

Describe the solution you'd like
I would like to have a {plover:cycle} function implemented that can be used to affect output of the most recent stroke (except for if that stroke was assigned to {plover_cycle}) in following way:
If a dictionary entry for modified stroke is a list then delete the word that was recently typed with that stroke and substitute it with next one from list of words.
In case most recent word wast last on the list, replace it with first one.
If a dictionary entry is not a list of words but a single word, do nothing.

{plover:cycle_back} would use just the same underlying function but instead of moving to the next word from a list it would move to previous one - to cover the case in which user used {plover:cycle} too many times, or he knows that needed word is most likely at the end of word list.

Describe alternatives you've considered

Current alternative is to define multiple entries, one for each word like:
"ABCD": "word",
"ABCD/MOD": "word2",
ABCD/MOD/MOD": "word3",
but this solution lacks the possibility to move back from "word3" to "word"

Additional context
None

This can be done half-automatically currently by Python dictionary.

Why don't you just */* to get back to word1?

Side note, I think there's some plugin to show list of suggestions for the next stroke to press to get a word in a side window (e.g. "1: word1, 2: word2, etc."), but I can't remember the details.

I just think it would be a nice addition to Plover (and not necessarily as a plug-in, but a built-in feature, that does not mess with existing functionality at all), not saying it is currently not possible to do at all. This would cover all formats of dictionaries, not just those from a subset of formats.