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

Mouse is being grabbed as keyboard #123

Open
laech opened this issue Dec 5, 2022 · 6 comments
Open

Mouse is being grabbed as keyboard #123

laech opened this issue Dec 5, 2022 · 6 comments
Labels
bug Something isn't working help welcome Help/contrib is esp welcome

Comments

@laech
Copy link

laech commented Dec 5, 2022

Describe the bug or unexpected behavior
I have a Logitech MX Master 3 mouse, and keyszer is grabbing that as a keyboard, as a result some mouse buttons no longer work.

Sample Config or Instructions to Reproduce

Happens on keyszer startup, not config specific.

Your setup

  • Python version: 3.10.7

  • Keyszer version: main@6161801

  • Kinto version (if applicable): N/A

  • Devices (+K) we're handling input from:

    (--) Autodetecting all keyboards (--device not specified)
    (+K) Grabbing Logitech Wireless Mouse MX Master 3 (/dev/input/event21)
    

Expected behavior

Mouse to not be grabbed.

Additional context

The old xkeysnail didn't have this problem.

@laech laech added bug Something isn't working help welcome Help/contrib is esp welcome labels Dec 5, 2022
@joshgoebel
Copy link
Owner

I'd love some debugging and full list of keys the mouse says it supports...
https://github.com/joshgoebel/keyszer/blob/main/src/keyszer/devices.py#L13

If it has QWERTY, A, Z, and Space I'm not sure how that's not really totally a keyboard?

Perhaps we just need a blocklist feature?

@joshgoebel
Copy link
Owner

as a result some mouse buttons no longer work.

Which ones?

@laech
Copy link
Author

laech commented Dec 5, 2022

The backward and forward buttons don't work.

This is the full capabilities object for the mouse:

{
  0: [0, 1, 2, 4, 20],
  1: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 113, 114, 115, 116, 117, 119, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 240, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287],
  2: [0, 1, 6, 8, 11, 12],
  4: [4]
}

@joshgoebel
Copy link
Owner

So it's effectively a keyboard. :-). I'd be open to a skip_device config setting along the same lines as #19 if you were interested in working on a PR.

Or if you have another suggestion how we're supposed to not detect this as a keyboard when it's literally saying it has every single key a keyboard has?

@laech
Copy link
Author

laech commented Dec 11, 2022

Seems this is how xkeysnail is detecting it's a mouse not a keyboard https://github.com/mooz/xkeysnail/blob/bf3c93b4fe6efd42893db4e6588e5ef1c4909cfb/xkeysnail/input.py#L28-L30

@joshgoebel
Copy link
Owner

That has it's own problems because some keyboards include a built in tracking device WITH pointers, which that improperly flags as a non-keyboard... that combo seems more likely than a mouse that reports having all the keys of a full keyboard, but truly has none.

I'm guessing it's some kind of fancy gaming mouse. I'll leave the issue open, but I don't consider this a bug - the suggested fix is we add a skip_device feature as suggested above so you could just block-list it in your config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help welcome Help/contrib is esp welcome
Projects
None yet
Development

No branches or pull requests

2 participants