Re: btnx: Send keyboard and mouse combination events with mouse buttons
Quote:
Originally Posted by
airjer
I've got a new problem now. I have my MX Revolution's side front and back keys set for alt+left and alt+right respectively. The alt key tends to get stuck as being pressed randomly and I have to press the actual keyboard to get it to release. Sometimes that does not even work and is quite annoying. What could be causing this?
Set the "Force immediate button release" property for each button that has this problem in btnx-config. It releases the key combination right after you press the mouse button (it doesn't wait for you to release the mouse button).
It's a strange problem I never found a good explanation for. Usually it appears for keycombos that make the OS do a lot of work (switch workspace with lots of windows, browser back and forward in big webpages, etc). It seems as if signals get lost.
Re: btnx: Send keyboard and mouse combination events with mouse buttons
Quote:
Originally Posted by
odierick
Thank you for reminding me about that solution to double-click with a mouse button. I'm most grateful.
However, the issue about X apps not executing from a script unless btnx is manually restarted remains. Can you reproduce this behavior?
Try using su instead of sudo:
Code:
/bin/su odierick -C /home/odierick/bin/DoubleClic.sh
Or place the su command in the script, and only give the script name to btnx-config like I described here: https://bugs.launchpad.net/btnx-config/+bug/198339
Re: btnx: Send keyboard and mouse combination events with mouse buttons
And a little news about btnx 0.4.12:
It changes the default revoco option to permanent for MX Revolution users. This means the wheel behavior doesn't change when the mouse goes to sleep. I will release it at a later date, but it's already available in the SVN trunk.
Re: btnx: Send keyboard and mouse combination events with mouse buttons
Quote:
Originally Posted by
daou
It could be a problem with your locale settings. The German translations work fine on my Feisty. This is what I do to test the German translations:
Code:
$ export LANGUAGE=de_DE
$ sudo btnx-config
Thanks for your quick reply!
Is there a possibility to prevent btnx-config from using the german translation? Probably the english version works for me...
Re: btnx: Send keyboard and mouse combination events with mouse buttons
Quote:
Originally Posted by
Alrik
Thanks for your quick reply!
Is there a possibility to prevent btnx-config from using the german translation? Probably the english version works for me...
Try
Code:
$ export LANGUAGE=en_US:en
$ sudo btnx-config
But for the German, you could have also tried
Code:
$ export LANG=de_DE.UTF-8
$ export LANGUAGE=de_DE:de
$ sudo btnx-config
Re: btnx: Send keyboard and mouse combination events with mouse buttons
Quote:
Originally Posted by
daou
Set the "Force immediate button release" property for each button that has this problem in btnx-config. It releases the key combination right after you press the mouse button (it doesn't wait for you to release the mouse button).
It's a strange problem I never found a good explanation for. Usually it appears for keycombos that make the OS do a lot of work (switch workspace with lots of windows, browser back and forward in big webpages, etc). It seems as if signals get lost.
I had that set to begin with, but still get the same result. It happens during simple back and forward tasks in Nautilus.
Re: btnx: Send keyboard and mouse combination events with mouse buttons
Quote:
Originally Posted by
daou
Try
Code:
$ export LANGUAGE=en_US:en
$ sudo btnx-config
But for the German, you could have also tried
Code:
$ export LANG=de_DE.UTF-8
$ export LANGUAGE=de_DE:de
$ sudo btnx-config
Thanks a lot, the export ... UTF-8 worked fine!
Re: btnx: Send keyboard and mouse combination events with mouse buttons
Daou,
Thanks a lot for all your work on btnx. It's working great for me on Hardy, except that I can't X to stop grabbing the button events from my MX Revolution. I am using your suggested xorg.conf configuration, and I've pasted my xorg.conf below. Can you suggest anything else to try?
Code:
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "ZAxisMapping" "4 5"
EndSection
Section "Device"
Identifier "Configured Video Device"
Driver "nvidia"
Option "NoLogo" "True"
EndSection
Section "Monitor"
Identifier "Configured Monitor"
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
Defaultdepth 24
EndSection
Section "ServerLayout"
Identifier "Default Layout"
screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Mouse0" "CorePointer"
EndSection
Section "Module"
Load "glx"
EndSection
Re: btnx: Send keyboard and mouse combination events with mouse buttons
Quote:
Originally Posted by
daou
Replacing sudo by su -c didn't make X app start, but it made the X app output some error (there was no output before) :
Code:
Cannot open display:
It made me think that maybe the environment was not correctly set by btnx so I examined the environment with 'export' from my script and found out that it was lacking X window variables.
Then all became clear : when btnx starts the first time from init.d there is no X window so when it executes commands it spawns shells without X window support.
When manually restarted, btnx receives current xterm environment so X apps can run.
Anyway, my solution is to setup DISPLAY and XAUTHORITY at the begining of my script like this :
Code:
#!/bin/sh
# /root/bin/btnx-su.sh
umask 022 # To read/write files.
export DISPLAY=':0.0'
export XAUTHORITY=`ls /tmp/.gdm*`
su -c "$1" odierick
The above script is a wrapper. Here is the actual function of the button :
Code:
#!/bin/sh
# /home/odierick/bin/DoubleClic.sh
xte 'mouseclick 1' 'mouseclick 1' 2>&1 >/home/odierick/btnx.log
And in btnx-config the button is associated with the command :
Code:
/root/bin/btnx-su.sh /home/odierick/bin/DoubleClic.sh
And finally I can execute X apps with a mouse button without restarting btnx!
What is not clear is why restarting with btnx-config doesn't provide a full environment to btnx.
Should you investigate this further here is some information :
Initially btnx environment has no DISPLAY nor XAUTHORITY variable so at first commands have no X window support.
When restarted in btnx-config those variables become :
Code:
export DISPLAY=':0.0'
export XAUTHORITY='/tmp/libgksu-cvFQDg/.Xauthority'
It seems that X apps cannot open display with this environment.
When btnx is manually restarted it finally is :
Code:
export DISPLAY=':0.0'
export XAUTHORITY='/tmp/.gdmZQ3GAU'
and X apps can open display.
Anyway, my issue is resolved, thanks Daou!
Re: btnx: Send keyboard and mouse combination events with mouse buttons
Sorry if I missed it, but is there a list of mouses that are known to work with this? I'd like to know if it works with Logitech MX 1000, since I'd like to be able to configure my extra buttons so I can set them to other keyboard buttons (like ctrl, shift, pgUp, etc.)
It would be so nice to be able to do that for setting hotkeys for games like WoW, and Vent... the one thing I truly miss from Windows.