DeedleFake / ptt-fix

X11 key forwarder to allow push-to-talk to work in Wayland.
MIT License
11 stars 0 forks source link

"inappropriate ioctl for device" for Logitech USB Receiver #6

Closed MirandaStreeter closed 1 year ago

MirandaStreeter commented 1 year ago

When configuring mouse forward for my Logitech MX Vertical (key 0x115, sym mouse 9), it fails to grab or output the correct button event.

Snippet of input-event-codes.h:

#define BTN_FORWARD             0x115

ptt-fix output:

Apr 21 16:45:36.628 WARN ignoring device
        device=/dev/input/by-id/usb-Logitech_USB_Receiver-if02-mouse
        reason="failed to open"
        err="get device name: inappropriate ioctl for device"

If I've configured this incorrectly, feel free to let me know.

If the ioctl request itself is the issue I can go ahead and grab strace output so we can pick apart the file descriptor.

DeedleFake commented 1 year ago

Are there any other devices under /dev/input that the mouse could correspond to? A number of physical devices show up as several different devices under there sometimes, and usually only one or two will work. For example, my mouse shows up as all four of

usb-04d9_USB_Laser_Game_Mouse-event-if02
usb-04d9_USB_Laser_Game_Mouse-event-mouse
usb-04d9_USB_Laser_Game_Mouse-if01-event-kbd
usb-04d9_USB_Laser_Game_Mouse-mouse

but usb-04d9_USB_Laser_Game_Mouse-mouse doesn't work as only the others support the necessary ioctl produce the events that ptt-fix looks for. The reason that there are so many is because, for example, usb-04d9_USB_Laser_Game_Mouse-if01-event-kbd is the one that yields events that correspond to keyboard keys that have been mapped to mouse buttons.

DeedleFake commented 1 year ago

As there's been no response for several weeks now, I'm going to assume that you managed to fix the issue and close this. Feel free to comment again if that is not the case.