Page 100 of 128 FirstFirst ... 50909899100101102110 ... LastLast
Results 991 to 1,000 of 1273

Thread: btnx: Send keyboard and mouse combination events with mouse buttons

  1. #991
    Join Date
    Jun 2006
    Location
    Finland
    Beans
    796
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    Quote Originally Posted by airjer View Post
    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.
    Last edited by daou; May 3rd, 2008 at 08:44 AM.
    echo -e "\x6f\x61\x73\x61\x6c\x6f\x6e\x65\x6e\x40\x67 \b\x6d\x61\x69\x6c\x2e\x63\x6f\x6d"
    It compiles! Ship it!

  2. #992
    Join Date
    Jun 2006
    Location
    Finland
    Beans
    796
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    Quote Originally Posted by odierick View Post
    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
    Last edited by daou; May 3rd, 2008 at 08:57 AM.
    echo -e "\x6f\x61\x73\x61\x6c\x6f\x6e\x65\x6e\x40\x67 \b\x6d\x61\x69\x6c\x2e\x63\x6f\x6d"
    It compiles! Ship it!

  3. #993
    Join Date
    Jun 2006
    Location
    Finland
    Beans
    796
    Distro
    Ubuntu Jaunty Jackalope (testing)

    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.
    echo -e "\x6f\x61\x73\x61\x6c\x6f\x6e\x65\x6e\x40\x67 \b\x6d\x61\x69\x6c\x2e\x63\x6f\x6d"
    It compiles! Ship it!

  4. #994
    Join Date
    Dec 2007
    Beans
    4

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    Quote Originally Posted by daou View Post
    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...

  5. #995
    Join Date
    Jun 2006
    Location
    Finland
    Beans
    796
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    Quote Originally Posted by Alrik View Post
    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
    Last edited by daou; May 3rd, 2008 at 02:57 PM.
    echo -e "\x6f\x61\x73\x61\x6c\x6f\x6e\x65\x6e\x40\x67 \b\x6d\x61\x69\x6c\x2e\x63\x6f\x6d"
    It compiles! Ship it!

  6. #996
    Join Date
    Aug 2007
    Beans
    19

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    Quote Originally Posted by daou View Post
    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.

  7. #997
    Join Date
    Dec 2007
    Beans
    4

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    Quote Originally Posted by daou View Post
    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!

  8. #998
    Join Date
    Jul 2006
    Beans
    38

    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

  9. #999
    Join Date
    Apr 2008
    Beans
    7
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    Quote Originally Posted by daou View Post
    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
    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!

  10. #1000
    Join Date
    May 2007
    Beans
    105
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    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.

Page 100 of 128 FirstFirst ... 50909899100101102110 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •