xbindkeys-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xbindkeys-devel] Undocumented mouseclick/mousebutton modifiers?


From: Mark Lawson
Subject: Re: [Xbindkeys-devel] Undocumented mouseclick/mousebutton modifiers?
Date: Thu, 24 Nov 2016 11:54:23 -0800

Hi Eugene,

Thanks for the quick response! I believe that this has solved half of the problem. Using this fork, and the exact same command structure that you listed, my "b:8" key works just fine with the control, shift, and alt modifiers pressed down now.

However, "allmods" does not seem to be covering the mouseclick modifiers, still. So, if I press down right click, and then press "b:8", the script does not fire.

I tried to do the following, but had no luck, trying to get "b:8" to trigger the script when "b:3" is pressed down already:

(define allmods "m:32768")

;; test
(xbindkey (list allmods "b:8" + "b:3") "test_script")

Here "b:3" is my right click, but I had no luck with this. I couldn't get the script to fire in any situation with this line of configuration.

Any thoughts?

Thank you,

Mark

On Thu, Nov 24, 2016 at 6:59 AM, Eugene Pakhomov <address@hidden> wrote:
Hi Mark,

Could you please check if this fork works for you? https://github.com/p-himik/xbindkeys
I've sent a PR awhile back, but apparently it didn't make it.

In your config, you'd need to use "AnyModifier".
E.g. I have these lines in my ~/.xbindkeysrc.scm:

(define allmods "m:32768")

(xbindkey (list allmods "b:9") "xte 'keydown Control_L' 'key Insert' 'key Insert' 'keyup Control_L'")
(xbindkey (list allmods "b:8") "echo 'cycle pause' | socat - /tmp/mpvsocket")

Regards,
Eugene


On Thu, Nov 24, 2016 at 12:10 PM, Mark Lawson <address@hidden> wrote:
Hello everyone,

So far, xbindkeys has always met all my needs. However, I believe that the mouseclick modifiers may not be documented, and more importantly, that they are not recognized when used in the xbindkeysrc file.

My use case is simple: I am binding the forward button of my Logitech G400s mouse to a new action. All that you would expect would be required is right here:

"my_script args"
  b:9

It works as expected in most conditions. However, if the left click button is also pressed down, and is still held down when I press the forward button, the script does not fire.

"xbindkeys -k" does not recognize forward mouse buttons, though I did notice that when I have the left click button pressed, and then press a normal key (like 'r'), this output is generated:

$ xbindkeys -k
"(Scheme function)"
    m:0x100 + c:27
    r

Whereas for a normal 'r' press, it is simply "m:0x0".

When the same thing, but with right click pressed down, I get "m:0x400". Left and right both pressed down, predictably, makes "m:0x500".

However, I was not able to get any of these modifiers to be respected. First, I tried changing the associated key to "b:9 + b:1", but that would only fire immediately upon b:1 being pressed down; b:9 didnt work at all here.

Then, I tried to use "m:0x100 + b:9", however, that did not work either.

The only (english) reference I could find online to the most basic "m:0x100" modifier was this:
https://github.com/Zren/WindowsToLinux/blob/master/home/chris/.xbindkeysrc

Which seems to imply that it is the same thing as "b:1". But I would imagine that "b:1" is the button itself, whereas "m:0x100" is the state of the mouse at the time some other button is pressed down.

Any suggestions? My ultimate goal is for this forward mouse button to trigger my script regardless of whether or not the left or right click buttons are pressed down at the time I hit the forward button.

Thanks for reading!

-Mark



reply via email to

[Prev in Thread] Current Thread [Next in Thread]