On Thu, Mar 19, 2020 at 02:53:29PM +0100, borislav nikolov wrote: > Package: consolation > Version: 0.0.7-1 > > Hi, > thank you so much for writing this! I was struggling with gpm for a > while because of /dev/input/mice not sending buttons properly for > trackpads. > > For me middle button is just annoyingly difficult to press on t440p, > and I wanted to use the "right" button (top right area) as paste > button. > > I added a quick patch/hack (attached), that adds --set-paste-button > option, that allows me to use the right button.
Hello Borislav, Thanks for your patch. Your patch works, but it the way you use it (--set-paste-button=BTN_RIGHT) remove the possibility to use a button to delimitate the selection. Also such setting should be per device. (If you plug a mouse, you might not want the mouse to be affected). So maybe we need something more general. Looking at the code, I try to keep the libinput options separated from the extra consolation options ("Other options:"), because I sync file src/shared.c/src/shared.h with the version in libinput/tools (this allows new libinput options to be supported by consolation). I think it could be cleaner to keep the eame of the button as they are in action.c and change the code in input.c to do the translation. For example replace the line in input.c button = libinput_event_pointer_get_button(p); by button = permute_buttons(libinput_event_pointer_get_button(p)); where permute_buttons() switch BTN_RIGHT and BTN_MIDDLE when needed. Unfortunately, libinput is not quite configurable. (For example on two-button touchpad, I use tap->left, left-button -> middle, right-button -> right, but this is not a setting possible for libinput, I need to use synclient). > PS: > I am new to the debian community, and I apologize if this is not the > right way to send a patch. An advice then: You should not need to CC the maintainer when reporting a bug, since they get a copy anyway. Also in general you should not CC email sent to submit@bugs because they lack the bug number, you should use the X-Debbugs-CC pseudo-header instead. Thanks for using consolation! Bill