xbindkeys-devel
[Top][All Lists]
Advanced

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

Re: [Xbindkeys-devel] xbindkeys locking mouse


From: Jean-Baptiste Rouquier
Subject: Re: [Xbindkeys-devel] xbindkeys locking mouse
Date: Tue, 19 Jul 2011 17:52:07 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110516 Thunderbird/3.1.10

Dear list,
In short: I have the same problem.


I have a mouse with a rather high resolution, say 1500dpi.
I would like to switch to a low resolution (~300dpi) for a short while. Best
would be
- when I press button 10, the resolution switches to 300dpi
- when I release the button, resolution is back to 1500dpi.

The Windows "setpoint" driver offers a slightly different behaviour:when I click
button 10, resolution is toggled between both speeds.
But I would prefer to hold button 10 when needing improved precision, and
release it to get back to normal (this just saves one click, but many times!).

The intended use is drawing and gaming.


So far, I have this .xbindkeysrc :
"xinput --set-prop 'pointer:Logitech USB Receiver' 'Device Accel Constant
Deceleration' 5"
  b:10
"xinput --set-prop 'pointer:Logitech USB Receiver' 'Device Accel Constant
Deceleration' 1"
  release + b:10
Mouse is as expect much slower when Button 10 is pressed, but, like for El
Sjaako, button 1 does not report any event in xev as long as button 10 is
pressed. Which makes the whole thing unusable.
When xbindkeys is not running, xev does report ButtonPress / ButtonRelease for
button 1 event when button 10 is pressed.



As a workaround, I have reproduced the Setpoint behaviour with the following
~/.xbindkeysrc.scm config file:

(define precise-mouse #f)
(xbindkey-function
 '("b:10")
 (lambda () ;toggle the value of precise-mouse and the deceleration constant
     (if precise-mouse
             (begin
                (set! precise-mouse #f)
                (run-command "xinput --set-prop 'pointer:Logitech USB Receiver'
                  'Device Accel Constant Deceleration' 1"))
             (begin
                (set! precise-mouse #t)
                (run-command "xinput --set-prop 'pointer:Logitech USB Receiver'
                   'Device Accel Constant Deceleration' 5"))
             )
     )
 )


Feel free to ask hardware details.
Thanks for any progress on this issue!
Jean-Baptiste



-------- Original Message --------
From:     El Sjaako
Subject:     [Xbindkeys-devel] xbindkeys locking mouse
Date:     Fri, 27 May 2011 16:12:18 +0200

Hello,

I've got a mouse with many buttons, and I want to use these as
modifier keys. For example, I want to use button 8 as Ctrl. I have
already managed to do this, using the following command:

#Ctrl
"xdotool keydown ctrl"
    b:8

"xdotool keydown ctrl"
    m:0x14 + b:8

"xdotool keyup ctrl"
    release + b:8

"xdotool keyup ctrl"
    release + m:0x14 + b:8


I've also got the guile version:
;;Control
(xbindkey '("m:0x14" "b:12") "xdotool keydown ctrl")
(xbindkey '( Release "m:0x14" "b:12") "xdotool keyup ctrl")

(xbindkey '("b:12") "xdotool keydown ctrl")
(xbindkey '( Release "b:12") "xdotool keyup ctrl")

Unfortunately, this locks up the mouse, so I can't use this to do
things like ctrl click or ctrl scroll, because it blocks all signals
from the mouse until you release button 8. I can do things with the
keyboard without any problem, such as using button 8 + a to select
all.

I have checked that it blocks the mouse (including all clicks and
movements of the mouse) using xev.

It also blocks the mouse using other programs (I used "play file.wav"
to test this), so the problem seems to be on the xbindkeys end.

Is there a way to not block the mouse in these cases?

Thanks,
Bart





reply via email to

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