Ikcelaks / qmk_sequence_transform

Sequence-Transform is a user library for QMK that enables a rich declarative ruleset for transforming a sequence of keypresses into any output you would like.
Apache License 2.0
5 stars 3 forks source link

Autocorrection compatibility issues #10

Open QKekos opened 6 months ago

QKekos commented 6 months ago

Autocorrection uses very similar approach with process_autocorrect(keycode, record), so make our send strings actually queue the keys for autocorrect too + maybe dequeueing if we find how

Ikcelaks commented 6 months ago

IMO, there is no reason for a user to use both Sequence Transform and Autocorrect. Every* valid Autocorrect rule can be used directly as a Sequence Transform rule.

QKekos commented 6 months ago

As I said multiple times - autocorrect and st have very different goals

QKekos commented 6 months ago

Regard implementation details - I believe that we should just process_autocorrect(keycode) each time st types out something, and do the same for process_autocorrect(KC_BACKSPACE) each time we delete something

Ikcelaks commented 6 months ago

I thought about this a bit again. I think the best solution is to allow the user to specify a second dictionary with rules that they don't want the training mode to trigger on.

These rules would go in their own trie that is appended on the end of the existing trie (so that we can still reference them with a single offset) and the rules matched would process them but rules search would ignore them.

Bonus, a user could put most of their rules in here and just have training mode trigger on a small subset, which could be nice for people trying to learn them one block at a time, or people with huge rulesets that are seeing performance issues on search.