I have a Logitech Proteus Core mouse. Under Windows 10, I have set one of its buttons (the small one labeled "G9" on top of the mouse) to show a task list, which can be brought up using the Win+Tab keys. Note that this stays up even if you release both the Win and the Tab keys, it only goes away once you click on the Window you want to go to. So the workflow is: push and release the G9 mouse button, click the window I want.
I want a similar behavior under Kubuntu 15.04. AFAIK, there is no way to bring up a similar task list, which stays up until you click on something, without having to hold down any keys.
So my idea was to emulate Alt+Tab with this button. The workflow I have in mind is: push G9 (shortcut for "push alt, push tab, realease tab") => select the window I want, release G9 (shortcut for "release alt").
The problem is that, as far as I can tell, this G9 button is not being read by the OS as a normal mouse button. If I run:
And click the G9 button, I get this output:
"(Scheme function)" m:0x40 + c:23 Mod4 + Tab "(Scheme function)" m:0x40 + c:133 Mod4 + Super_L
Note: I am running this in a VM for testing purposes. Let me know if that can affect things, although I'd need it to work in this case as well.
If I run:
xev | grep button
I get no output when I click the G9 button I'm interested in. If I click other buttons, I get expected outputs like:
state 0x0, button 2, same_screen YES
This is weird, but I thought I could just add what
xbindkeys -mk outputs to my
"xte 'keydown Alt_L' 'key Tab'" m:0x40 + c:23 + Release
Obviously, even if this worked, it wouldn't do what I want it to, but it doesn't even work. Nothing happens when I click the G9 button after running:
xbindkeys -v -n
Which gives this warning:
Please verify that there is not another program running which captures one of the keys captured by xbindkeys. It seems that there is a conflict, and xbindkeys can't grab all the keys defined in its configuration file.
If I type the
xte command in the console, it brings up the task selection alt+tab menu. Nothing for the bound mouse button however.
If I assign the same
xte call to another button, one that's shown by the
xev output (I tried the right mouse button), it's still not executed (it seems like only the tab is executed, as it tabs things in the text editor), but the warning is gone, and the regular function of the button is also gone:
How can I get the
Alt+Tab behavior I described when clicking the G9 button? What about another button, one that
xev detects, like
Note: this mouse saves the configuration made from its Windows software internally. So all my other buttons keep their functions in the VM: back/forward in browser, switch browser tabs etc. The Logitech software allows macro recordings in Windows, but it doesn't allow specifying different actions for push / release events, AFAIK.
If there is a way to record the right macro under Windows, or there is a way to simplify what I want to achieve under Kubuntu - that is, use the G9 button to get similar functionality to alt+tab -, I would also accept those solutions.