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

One shot modifiers and sequences #1471

Open
2 tasks done
rudolf-adamkovic opened this issue Jan 8, 2025 · 1 comment
Open
2 tasks done

One shot modifiers and sequences #1471

rudolf-adamkovic opened this issue Jan 8, 2025 · 1 comment
Assignees
Labels
bug Something isn't working PRs welcome jtroo has no plans to work on this at present, but PRs are welcome

Comments

@rudolf-adamkovic
Copy link

Requirements

Describe the bug

I would like to define a sequence with one-shot modifiers and other keys that can be modified with those one-shot modifiers.

Relevant kanata config

A minimal example:

(defcfg process-unmapped-keys yes
        sequence-timeout 16000)

(defsrc)

(defvirtualkeys one-shot-shift (one-shot 9999 lsft)
                number-one 1)

(defseq one-shot-shift (s)
        number-one (n))

(deflayermap (base) , sldr)

To Reproduce

  1. Run Kanata with the config above.
  2. Type ,s,n.
  3. See the output 1.

Expected behavior

The expected output is !, that is S-1.

Kanata version

1.8.0-prerelease-1

Debug logs

No response

Operating system

MacOS

Additional context

I tried to use one-shot-pause-processing in multi and macro, but neither worked for me.

@rudolf-adamkovic rudolf-adamkovic added the bug Something isn't working label Jan 8, 2025
@jtroo
Copy link
Owner

jtroo commented Jan 9, 2025

It can be kinda made to work but it's not ergonomic.

Sim link

(defcfg process-unmapped-keys yes
        sequence-timeout 16000)
(defsrc)
(defvirtualkeys one-shot-shift (one-shot 9999 lsft)
                number-one (multi 1 (macro 5 nop0)))
(defseq one-shot-shift (s)
        number-one (n))
(deflayermap (base) 
 , (multi (one-shot-pause-processing 5) sldr)
 s (multi (one-shot-pause-processing 2) s)
 n (multi (one-shot-pause-processing 2) n)
)

@jtroo jtroo added the PRs welcome jtroo has no plans to work on this at present, but PRs are welcome label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PRs welcome jtroo has no plans to work on this at present, but PRs are welcome
Projects
None yet
Development

No branches or pull requests

2 participants