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

feat: implemented an alt-repeat key #1392

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Nuclear-Squid
Copy link

@Nuclear-Squid Nuclear-Squid commented Nov 29, 2024

Describe your changes. Use imperative present tense.

Implemented an alt-repeat key. It functions the same as the standard repeat key, but takes in a list of pairs of keycodes to give substitutions. For instance, you can repeat keys as usual, but send e instead of d when repeating the d key.

A possible use-case for such a feature is to implement the "magic key" from Magic-Sturdy

Disclaimer : I am not a native English speaker, I am sorry if there are typos in the docs ^^'

Checklist

  • Add documentation to docs/config.adoc
    • Yes or N/A
  • Add example and basic docs to cfg_samples/kanata.kbd
    • Yes or N/A
  • Update error messages
    • Yes or N/A
  • Added tests, or did manual testing
    • Yes

@Nuclear-Squid Nuclear-Squid changed the title Alt repeat feat: implemented an alt-repeat key Nov 29, 2024
@Nuclear-Squid
Copy link
Author

This implementation only allows simple KeyCode -> KeyCode substitutions, which is still pretty limited. It’s not possible to repeat macros for instance (or alt-repeat a symbol with a macro), and rpt doesn’t seem to work with sequences (a sequence gg isn’t detected if you type it as g rpt). I’d like to help make that system more flexible, would you be interested in that ?

@jtroo
Copy link
Owner

jtroo commented Nov 29, 2024

Thanks for the contribution! Could you comment on the advantages of this action over switch?

https://jtroo.github.io/config.html#switch

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

Successfully merging this pull request may close these issues.

2 participants