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

config: Allow m:* to specify all mouse ids at once #842

Closed
wants to merge 1 commit into from

Conversation

jyn514
Copy link

@jyn514 jyn514 commented Sep 22, 2024

Previously, each mouse input device had to be specified explicitly in the config file. Now, all mice can be specified at once using m:*. To avoid backwards compatibility issues, * retains its existing meaning of "all keyboard devices".

To avoid capturing our own mouse output, the virtual pointer device is now marked as virtual (previously only the virtual keyboard was marked as virtual).

@jyn514
Copy link
Author

jyn514 commented Sep 22, 2024

i would like to add tests for this, but the test suite fails for me locally even without any changes :/ so it would be kind of difficult for me to make sure my new test passes.

chord-double.t: PASSED
WARNING: Insufficient output, timing out one more time...
chord-hold.t: ERROR: Extraneous keys.
Input:
a down
b down
199ms
x down
x up
a up
b up
1ms
a down
b down
200ms
x down
x up
a up
b up

Expected Output:     Output:
a down               a down
b down               b down
x down               x down
x up                 x up
a up                 a up
b up                 b up
control down         a down
x down               b down
x up                 x down
control up           x up
                     a up
                     b up

@lobre
Copy link

lobre commented Sep 23, 2024

Should a mention be made in the manpage?

Previously, each mouse input device had to be specified explicitly in the config file.
Now, all mice can be specified at once using `m:*`.
To avoid backwards compatibility issues, `*` retains its existing meaning of "all keyboard devices".

To avoid capturing our own mouse output, the virtual pointer device is now marked as virtual (previously only the virtual keyboard was marked as virtual).
@jyn514
Copy link
Author

jyn514 commented Sep 23, 2024

good call! done :)

@rvaiya
Copy link
Owner

rvaiya commented Dec 18, 2024

Apologies for the delay. I had earmarked this for reply and have not had a chance to address it.

Can you elaborate on the use case? Mouse support is currently highly experimental (many things don't work properly), which is why * currently only captures keyboards. Devices like trackpads are largely unsupported (and will misbehave if captured by keyd), which is why the feature currently requires the user to explicitly add their pointing device to the config file. Most people only have one or two pointing devices, and a wildcard which matches all mice might cause some nasty surprises, so I am generally opposed to it.

@jyn514
Copy link
Author

jyn514 commented Dec 25, 2024

i like my configuration files to be portable across machines. not having a wildcard means that either my config is specific to the exact hardware plugged in, or i have to do runtime detection in my install script.

i understand that mouse support is experimental, but, well, no one has to use the new wildcard. i think keeping the existing notice that mouses might break is enough, i don’t think banning mouse wildcards would discourage someone who’s already decided they want this.

@rvaiya
Copy link
Owner

rvaiya commented Dec 27, 2024

i like my configuration files to be portable across machines.
[...]
i understand that mouse support is experimental, but, well, no one has to use the new wildcard. i think keeping the existing notice that mouses might break is enough, i don’t think banning mouse wildcards would discourage someone who’s already decided they want this.

Real portability is not achievable by dint of the fact that mouse functionality will break at least 50% of the time. If you just copy a config containing this wildcard, it has the potential to render the machine unusable. The user should be explicitly whitelisting mice which are known to work.

@rvaiya rvaiya closed this Dec 27, 2024
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