3 ms·
I'd expect them to be documented somewhere, so that I could be sure that they're not gonna be swapped or map to some other buttons (and not have to find out abo
by dzaima 3y ago
I'd expect them to be documented somewhere, so that I could be sure that they're not gonna be swapped or map to some other buttons (and not have to find out about it through trial/error or blogs/reading GTK's source). edit: edited my original post to be more clear
- tedunangst 3y agoHow in the world is X supposed to know what USB event your mouse sends when you click the button on the side? Did you ask the mouse manufacturer for documentation?
- dzaima 3y agoI don't know where that information comes from (I'd assume the kernel? wayland[0] refers to the kernel[1]), but surely if I, and every GUI app that wants to use the mouse, is supposed to know it, X definitely could too. If I recall correctly, the left/middle/right button values were documented (to 1/2/3, which doesn't match the linux header ones), so surely more could. [0]: https://wayland.app/protocols/wayland#wl_pointer:event:button https://wayland.app/protocols/wayland#wl_pointer:event:butto... [1]: https://github.com/torvalds/linux/blob/4a0fc73da97efd23a383ca839e6fe86410268f6b/include/uapi/linux/input-event-codes.h#L355-L363 https://github.com/torvalds/linux/blob/4a0fc73da97efd23a383c...
- PH95VuimJjqBqy 3y agoI'm not sure I understand the complaint. Anytime I've ever had to map extra mouse buttons I've always had to do a discovery step to figure out what "button number" any specific mouse button mapped to.
- dzaima 3y agoIs that for back/forward, or extra buttons on top of those? Back/forward have pretty standard meanings & usages so I'd expect them to work out of the box (and they have for me). Can't comment much on other extra buttons though, quite possible those don't really have a good way of being handled.
- PH95VuimJjqBqy 3y agoI've never seen forward/back buttons that didn't involve the driver making interpretations.
- accoil 3y agoExtra buttons starting at 8 is due to the mouse wheel taking 4-7 (both horizonntal and vertical scrolling are represented as a button) https://www.x.org/releases/current/doc/man/man4/mousedrv.4.xhtml https://www.x.org/releases/current/doc/man/man4/mousedrv.4.x... """ Option "ButtonMapping" "N1 N2 [...]" Specifies how physical mouse buttons are mapped to logical buttons. Physical button 1 is mapped to logical button N1, physical button 2 to N2, and so forth. This enables the use of physical buttons that are obscured by ZAxisMapping. Default: "1 2 3 8 9 10 ...". """
- dzaima 3y agoRight, I had seen that 4-7 was scrolling, but that's still not describing which of the numbers greater than 7 will map to the back/forward buttons.
- accoil 3y agoIs there an actual standard for mice at that point? I.e. have mice manufacturers ever written down what signals are backwards/forwards? The Logitech G600 has 20 extra buttons, and no backwards/forwards button. I think it's more convention, as the applications are ultimately what are deciding to do with the mouse button. There's nothing to say that they could not put a context menu on the left click.
- dzaima 3y agoIn a sibling comment I noted wayland referencing some kernel values[0]; and I'd hope there would be some reasonable standard. I certainly didn't have to manually configure chrome & firefox for them to know which buttons on my mouse to map to previous/next page. Maybe the more exotic mouses would need some, but I'd still expect in such case that the user is able to say "ok this button is 'back'" to their DE, and not necessarily be forced to configure that for every single application individually. [0]: https://github.com/torvalds/linux/blob/4a0fc73da97efd23a383ca839e6fe86410268f6b/include/uapi/linux/input-event-codes.h#L355-L363 https://github.com/torvalds/linux/blob/4a0fc73da97efd23a383c...