Re: btnx: Send keyboard and mouse combination events with mouse buttons
The C++ version has been frozen. I simply don't have time to do it right now. Hopefully I will be able to continue it because it would allow some nice additions to btnx (or at least make it easier to include them).
Originally Posted by blazoner
About integrating btnx-config to the mouse tab: it can be done with enough work. But there are a few problems which are mostly related to user permissions. First, the program would not be able to read the mouse input handlers because they require root permissions. This is one reason why you need to run btnx-config as root. It's a smart layer of security, because for example key loggers could easily read your keyboard as well. So this means the button detection would have to be run as root.
If those preferences use btnx to send the events, then some changes need to be made so each user can have their own btnx configuration in their home directory. This leads to another problem. btnx requires root permissions to run, so it would have to be started as a daemon during boot (like it is now). But btnx has no way of knowing when a user logs in and when a user configuration needs to be loaded.
This would need something like dbus (or unix domain socket). So when a user logs in, they can launch an applet or other startup program to make btnx load the user's configuration through interprocess communication.
One thing. The button detection in btnx-config is not absolutely necessary. The mouse detection is, but USB mice report what buttons they have. The button detection makes the buttons much more easy to manage (for the user and the program).
From the user's point of view, they are able to name the buttons so they know exactly what buttons they are editing. For 3 button mice, it's not a problem because all mice are similar (left, right, middle). But as you start getting 5 or more, just a number does not help because the buttons might be anywhere and look like anything. Even if you detect and highlight the button, you will forget after one hour or a day what button 10 or 11 did.
Also, it makes it easier when troubleshooting is necessary. One problem is mice with cruise control or smart scroll, because they send 2 different button codes at once.
As for bluetooth, I'm not too familiar how Linux handles them. If the input handlers are similar to the normal ones btnx uses, then it shouldn't be a problem at all.
echo -e "\x6f\x61\x73\x61\x6c\x6f\x6e\x65\x6e\x40\x67 \b\x6d\x61\x69\x6c\x2e\x63\x6f\x6d"
It compiles! Ship it!