Hacker News new | ask | show | jobs
by batteryhorse 2900 days ago
I've wanted to do this as well. I came to the conclusion that you'll need to bypass the X windows input system and read the device directly, none of the current solutions (like libinput, mtrack, or synaptics) would work satisfactorily. And integrating it with Gtk or Qt will never work well because of the structure imposed by those frameworks (Cocoa/ObjC is a much more flexible framework)

I was able to write a prototype version of things like a tableview or image viewer that gets input directly from the touchpad device (that draws straight to an OpenGL texture or pixmap). The problem is that you'll never be able to integrate this with Gtk and Qt, it just doesn't fit together. And working within those two frameworks is kind of hell. Generally, gestures are not discrete, you can go halfway through a gesture and change your mind, but you'll still get graphical feedback from the UI. That's part of the joy of using the touchpad. But it's just easier to write it from scratch than to add it to Gtk or Qt.

For me personally, it's not a huge problem because I generally avoid Gtk and Qt apps if at all possible and make my own UI's, but I don't see it gaining widespread adoption so I don't know if it's worth the effort.

1 comments

Can you show your solution?