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

Feature request: no-erase action for normal macros and vitrual macros #1477

Open
SequentialDesign opened this issue Jan 12, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@SequentialDesign
Copy link

SequentialDesign commented Jan 12, 2025

Is your feature request related to a problem? Please describe.

i speak and write castlian, a romance language where accented characters (í, ñ, ü, etc.) are common. when using a macro that gets erased, kanata erases too many characters

for example, when writing política, i first chord polí and then tica, but then when gluing the words together, kanata deletes two extra characters because i use pause and ' as dead keys (pause as a compose key and ' as a dead key glyph)

...
macro-polí (macro sldr p $ndelay o $ndelay l $ndelay pause $ndelay ' $ndelay i $ndelay (on-press tap-vkey v-macro-word-end))
macro-tica (macro t $ndelay i $ndelay c $ndelay a $ndelay (on-press tap-vkey v-macro-word-end))
...
(b x a n f16) @macro-polí $cnto all-released ()
(l k e g) @macro-tica $cnto all-released ()
...
macro-seq-política (p o l pause ' i spc t i c a spc)
...
macro-seq-política (macro p $ndelay o $ndelay l $ndelay pause $ndelay ' $ndelay i $ndelay t $ndelay i $ndelay c $ndelay a $ndelay (on-press tap-vkey v-macro-word-end))

Describe the solution you'd like.

i hope that a no-erase action can be added just like zippychord has, except one that will work macros, sequences, and virtual keys

Describe alternatives you've considered.

i have not considered any other solution, but i would love to hear one !

Additional context

very useful for certain languages (and maybe even for emojis !? like when chaining possible emojis. who knows, haven't tried it with emojis, but one day i will)

@SequentialDesign SequentialDesign added the enhancement New feature or request label Jan 12, 2025
@SequentialDesign SequentialDesign changed the title Feature request: 'no-erase' action for normal macros and vitrual macros Feature request: no-erase action for normal macros and vitrual macros Jan 12, 2025
@jtroo
Copy link
Owner

jtroo commented Jan 16, 2025

#1489 adds sequence-noerase as a special action acting on active sequences. Sample configuration in the sim test case:

         (defcfg sequence-input-mode visible-backspaced)
         (defsrc)
         (deflayermap (base)
           0 sldr
           u (t! maybe-noerase u)
         )
         (deftemplate maybe-noerase (char)
            (multi
             (switch
              ((key-history ' 1)) (sequence-noerase 1) fallthrough
              () $char break
            ))
         )
         (defvirtualkeys s1 z)
         (defseq s1 (' u))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants