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

allow sequences to have an earlier defined sequence #1334

Open
SequentialDesign opened this issue Nov 8, 2024 · 0 comments
Open

allow sequences to have an earlier defined sequence #1334

SequentialDesign opened this issue Nov 8, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@SequentialDesign
Copy link

SequentialDesign commented Nov 8, 2024

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

sometimes i want to create a sequence whose beginning is the exact same as another sequence, and kanata does not let me do it. for example :

(defseq
sportsman (s p o r t s spc m a n spc)
sportsmanship (s p o r t s spc m a n spc s h i p spc)
)

is not allowed because the first part of the sportsmanship sequence starts exactly the same way as the entire sportsman sequence.

what i'm aiming for is the following :

chord sports, get sports. chord man right afterwards, get sportsman. this is all possible in kanata now with the following :

(defcfg
  danger-enable-cmd yes
  process-unmapped-keys yes
  concurrent-tap-hold yes
  sequence-input-mode visible-backspaced
  sequence-timeout 5000
)

(defvar
  cnto 200 ;; chord normal timeout
)

(defalias
sports (macro sldr s p o r t s spc)
man (macro m a n spc)
ship (macro s h i p spc)
)

;; ignore the exact letters i use to get stuff.  
;; you can use whatever
(defchordsv2-experimental
(m b c - o ins) @sports $cnto all-released ()
(t r s d a) @man $cnto all-released ()
(m r h u) @ship $cnto all-released ()
)

(defseq
sportsman (s p o r t s spc m a n spc)
;; sportsmanship (s p o r t s spc m a n spc s h i p spc) <-- won't work
)

(defvirtualkeys
sportsman (macro s p o r t s m a n spc)
;; sportsmanship (macro s p o r t s m a n s h i p spc)
)

and i would like sportsmanship to work as well just like sportsman does

Describe the solution you'd like.

it would be nice for sequences to work like eager tap-dance, where it's okay to for a trigger to share its beginning with another action

Describe alternatives you've considered.

i have not given much thought to this problem. i would be happy to hear about other solutions

Additional context

v2 chords are amazing. my issue seems like a trifle, but i nonetheless felt like it could be useful in some cases, even in those outside the realm of chording, and, of course, i would be very happy to have it

@SequentialDesign SequentialDesign added the enhancement New feature or request label Nov 8, 2024
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

1 participant