Skip to content

Conversation

Fuzzyzilla
Copy link
Owner

@Fuzzyzilla Fuzzyzilla commented Sep 15, 2024

A backend implementation using X11's xinput version 2 extension.

Closes #10.

Unfortunately, this implementation relies heavily on heuristics to detect the class and capabilities of hardware. There is not - as far as I can tell - a better way to go about it, and no resource exists listing the set of standard values. While I have a sizeable collection of hardware to test on, the heuristics will very likely need updating as more hardware is tried (pads with several rings, pads with sliders, tools with roll/distance/wheel/slider, airbrushes..., etc.).

Once implementation is finished (not yet, some breaking changes are still pending), I would greatly appreciate testing help to ensure this detects the full capabilities on all hardware. I will probably put out a call for this when the implementation is ready prior to making a release :3

  • Tool, Pad, Tablet hardware listing
  • Tool events
  • Pad events
  • Hardware Add/Remove Events
  • Timeout based Out events
  • Mouse emulation
  • Remove the use of Xinput 1.x APIs which "clients are requested to avoid mixing" with Xinput 2 (whoops)
    • Some necessary XI1 calls have no XI2 counterpart. I'm confused.
  • Refactor (a lot of this was written while I was pulling my hair out in utter bafflement)

@Fuzzyzilla Fuzzyzilla added enhancement New feature or request x11 Specific to the X11 backend labels Sep 15, 2024
@Fuzzyzilla Fuzzyzilla marked this pull request as draft September 15, 2024 01:25
this horribly broke in/out emulation.
this is turning out to not be very "device agnostic", one of the major goals of octotablet. Alas, cursed support is better than no support.
@Fuzzyzilla
Copy link
Owner Author

Good news, after digging through several driver implementations (xf86-input-libinput, xf86-input-wacom, xf86-input-evdev, xwayland), it seems things are more standardized than is exposed through public documentation, and the things that aren't standardized are presented through driver-specific properties. These have been implemented and it's all around more scrumptious, however the heuristics must unfortunately remain for when the drivers aren't available. Getting there!

@bokubeam
Copy link

Hi! I'm interested in using octotablet for a tileset creation tool I'm working on here: https://github.com/verkaboot/tessellate

I'm using X11, so I'm definitely interested in these updates. I would be happy to help if there's anything I can do.

@Fuzzyzilla
Copy link
Owner Author

Thank you for the interest ^^. I am very pleased to see this crate put to use :3
I got a bit caught in the weeds of implementation details on this PR, so I haven't touched this in a bit. I will say having someone in need of this feature will be great motivation for getting it done!

I believe I have most of the protocol and hardware/driver-specific quirks mapped out in my notes, which was the hard part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request x11 Specific to the X11 backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

X11 xinput2 Support
2 participants