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

Use the tap-hold hack to circumvent kanata's #422 #7

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

vn971
Copy link
Contributor

@vn971 vn971 commented Dec 17, 2024

This is a proposal PR to include a work-around for kanata's jtroo/kanata#422

The problem and its fix are documented in the main kanata's documentation file for tap-hold: https://github.com/jtroo/kanata/blob/main/docs/config.adoc#tap-hold

I can confirm on my machine that without this work-around kanata causes weird behavior such as typing a symbol multiple times for no reasons, usually multiple times in a minute. With this work-around applied, the problematic behavior is gone.

I'm proposing this PR to help people new to kanata (and this repository) avoid problems with it out-of-the-box.

@argenkiwi
Copy link

If I understand this correctly, the hack only applies to Linux. Maybe you could add the solution as a comment instead, so Linux users can benefit without forcing extra complexity for MacOS and Windows users.

I have not used Kanata extensively on Linux (I generally use keyd instead), but does this problem occur when using a different action, like tap-hold-release-timeout instead of plain tap-hold?

@vn971
Copy link
Contributor Author

vn971 commented Jan 2, 2025

I guess a platform-specific configuration could be used: https://github.com/jtroo/kanata/blob/main/docs/config.adoc#platform-specific-configuration
E.g. the simplest form is a huge section

(platform (linux)
 ... ;; everything here
)

and then below or above for other systems

(platform (win winiov2 wintercept macos)
  ... ; everything here
)

Also worth noting is that the PR targets a file inside a linux directory.

Those are the main ideas I guess. Mostly I was driven to create this PR just by wanting to fix a "wrongful" recommendation that looks like it should work, but practically leads to problems for users who'd try it.

@argenkiwi
Copy link

I haven't used platform blocks, but it certainly looks tidier.

I share the sentiment, I created #9 so some of the more prevalent complains in the comment section of the video are addressed.

It's great that this video shows up among the top recommendations when searching for home row mods on YouTube so more people become aware of Kanata, but if they bump into issues too soon they may reject it as an option.

@elliottminns
Copy link
Member

Yo! Thanks for this.

I'll test this tonight on my laptop to ensure it works as expected, although currently I have no issues with tap-hold on macOS or Linux.

If everything looks good will merge it in!

@elliottminns
Copy link
Member

Managed to test it sooner. It looks like everything is working as excepted for me.

Will go ahead and merge this in, thanks again!

@elliottminns elliottminns merged commit e3c7095 into dreamsofcode-io:main Jan 8, 2025
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.

3 participants