pinchord-19 Undoable Modifiers

Pinchord · pinchord.git · Tickets · Changelog

A Pinchord Ticket (Completed):

Ticket · History

Previous ticket name: undoable-enter

Closed, released with pinchord-8 v30

Symptom

The enter/return and tab strokes in the mods dict are not added to the Plover/Javelin undo stack, which can lead to weird behavior when using them to write prose.

Problem

Plover and Javelin have 2 types of translations like enter and tab, one that can be undone, and one that can't. An stroke must select one of these, and Pinchord currently always opts for the non-undoable version.

Potential Solutions

Since the mods are implemented in a JSON dict, the same dictionary is used for Plover and Javelin, and this doesn't need to be solved separately.

Make These Strokes Undoable

These strokes could always be undoable, and treated like a character rather than a shortcut. This seems to be how the steno users I've asked use them anyway.

Use Separate Strokes

In steno, this is quite common. + vs no + could be used for the undoable and not undoable versions of these shortcuts.

Nothing else in Pinchord really works like this, and it doesn't seem very intuitive.

Implementation

Always Undoable

Need to update generate-mods.clj.

Currently enter is defined as the "return" shortcut rather than the undoable \n because {#control(\n)} does not work. Tab is similar.

So the generation needs to branch based on whether any mods are being used. + should be redundant. -T, -* and -e, which duplicate the given chord, will also need to work. Since these currently don't work for the rest of the shortcuts, even though they probably should, I will keep the behavior consistent and just leave repetition out of this ticket, and just leave repetition out of this ticket.

A branch can probably just be added to the generation for chords that need to work differently based on mod usage.