Page 114 of 128 FirstFirst ... 1464104112113114115116124 ... LastLast
Results 1,131 to 1,140 of 1273

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

  1. #1131
    Join Date
    Apr 2007
    Beans
    116

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

    Quote Originally Posted by ktulu1115 View Post
    I tried for weeks getting my MX 1000 or whatever it is working with xbindkeys without any luck. This is quite aggravating that btnx will no longer with with 8.10 - it was the only application that actually made it easy to configure.
    It is! I wonder if the ubuntu/linux developers are all keyboarders ... and so don't really care for the mouse buttons.

    It is these "simple" features that windows users expect linux to already have but are missing, that push them away. They don't really care for whether the file system is ext2 or ext3 or FAT16 ... as long as they can install the OS and run.

    Anyone from canonical here running 8.10 and using anything remotely resembling a mouse with more than 2 buttons and a scrollwheel?

  2. #1132
    Join Date
    Sep 2008
    Beans
    2

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

    Can somebody please explain to me how the profiles work in btnx?

    What I want to do, is set up a 'Desktop' (or Default) profile and a 'Gaming' profile. The default profile binds my Logitech MX Revolution buttons to various compiz/window things like switching between workstations...this works just fine. But I also want to be able to switch to a profile where all the buttons are bound to F5-F12 so I can easily use them in games.

    The problem is every time I create a new profile, make it active & set up all new keys for it...when I go back to the Default profile all the keys are now F5,F6,F7 etc. It seems the 'Buttons' and 'Configurations' tabs are either unrelated or the Default profile is getting it's binds overwritten?
    Last edited by nexxteh; October 12th, 2008 at 09:49 AM.

  3. #1133
    Join Date
    Oct 2008
    Location
    England
    Beans
    960
    Distro
    Ubuntu 8.04 Hardy Heron

    Logitech MX518

    My Logitech MX518 nightmare, solved.


    My conf
    Code:
    Section "InputDevice"
    	Identifier  "MX518"
    	Driver      "evdev"
    	Option	    "Name" "Logitech USB-PS/2 Optical Mouse"
    	Option	    "AllowMouseOpenFail" "true"
    	Option	    "VertScrollDelta" "12"
    	Option	    "Emulate3Buttons" "false"
    EndSection

    - Install Lomoco.

    Set this up to run at each boot. I also set the dpi at this time too.

    Code:
    locomo -m 
    lomoco --no-sms
    exit 0
    in your /etc/rc.local for example.


    - Install btnx and btnx-config.

    Use the ppa repositories in the first post.

    With the earlier lomoco change, Btnx is now able to detect the buttons that are normally assigned to change the dpi. (above/below the scroll wheel).
    Without lomoco this is troublesome.

    It has taken me 2 weeks of Internet searching, Xorg editing, Xbindkeys tweaking, Xev monitoring and more to get to this point! Fun indeed.

    It's almost working. The dpi+ button is sending two messages currently. My Btnx command and a generic 'button 8'.

    The current kernel/driver reports both the thumb button and the dpi+ button (the button above the scroll wheel) as button 8.

    Hmm. Some time later...


    Use this xmodmap string:
    xmodmap -e "pointer = 1 2 3 4 5 6 7 10 9 8"

    Or
    pointer = 1 2 3 4 5 6 7 10 9 8

    in an ~/.xmodmap file that is set to run on startup.


    This renders these broken buttons unusable by X.
    This is good because Btnx still sees them.

    Now, map the thumb buttons to (KEY_LEFT + LEFT_ALT) and (KEY_RIGHT + LEFT_ALT). This gets back/forward working again in the browser.
    Fixes Nautilus and most other apps too. (No xbindkeys needed for Nautilus etc.)

    You can now map those two buttons by the scroll wheel for whatever you want. Success. Now make yourself some tea. You've earned it.

    ***

    Btnx and lomoco need to make it into Ubuntu as standard apps.
    They're invaluable, and Btnx is superbly done. Many thanks to the author.

    If the new Xorg renders Btnx unusable then we really need someone to fix Btnx or write a WORKING mouse tool. As someone noted, it's tragic that you have to jump through these hoops to get a mouse working. We need to make this easier.
    Last edited by Yashiro; October 21st, 2008 at 07:48 AM. Reason: :)

  4. #1134
    Join Date
    May 2008
    Beans
    22

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

    Quote Originally Posted by ktulu1115 View Post
    I tried for weeks getting my MX 1000 or whatever it is working with xbindkeys without any luck. This is quite aggravating that btnx will no longer with with 8.10 - it was the only application that actually made it easy to configure.
    It is indeed unfortunate that btnx is no longer working, however configuring with xbindkeys is not impossible. Here is a small HOWTO, I managed to get the same functionality out of my MX Revo that I had with btnx:

    =============================

    0. Note: this requires a newer version of X and the kernel, therefore a recent Intrepid Ibex. Older versions do not see all the mouse buttons correctly (but you can use btnx there).

    1. Install needed programs: xbindkeys and xmacro (use your favourite package manager instead of aptitude):

    $ sudo aptitute install xbindkeys xmacro

    2. Configure xbindkeys:

    $ nano ~/.xbindkeysrc

    #==============#
    "echo 'ButtonPress 2 ButtonRelease 2' | xmacroplay :0"
    c:0xE1

    "echo 'KeyStrPress Control_L KeyStr KP_Add KeyStrRelease Control_L' | xmacroplay :0"
    b:13

    "echo 'KeyStrPress Control_L KeyStr KP_Subtract KeyStrRelease Control_L' | xmacroplay :0"
    b:15

    "echo 'KeyStrPress Shift_L KeyStr Right KeyStrRelease Shift_L' | xmacroplay :0"
    b:17
    #==============#

    (you can also use "xbindkeys --defaults" to create a default config file, just remember to comment out those default settings)

    Customize the setup to suit your needs -- in my case, I have assigned the thumb wheel to Ctrl-+ and Ctrl-- (enlarge/shrink fonts in Firefox, Konsole, OO.org) and the thumb wheel click to Shift-Right (handy in Konsole/Firefox to switch tabs quickly); I also set the little "search" button as middle click as I find it a lot more convenient than clicking the wheel.

    The configuration basically entails two lines: the first contains the command to execute (in our case, the keys to send when a specific button is pressed) and the second line contains the trigger (in our case, the mouse button we want to assign to a task). In the above example, "c:0xE1" means "keycode 225" (hexa) -- the "search button", and "b:13" means "mouse button 13" (that's how X sees it via "xev"). Check out the xbindkeys man page or the default config file for more information.

    When adding/removing keys and mouse buttons to xmacroplay, remember to always give the "xxxRelease" event also, otherwise the key/button will remain pressed and strange things will happen!

    3. Test the settings:

    $ xbindkeys -n -v

    This should keep the program running on the terminal, and you can press the various buttons and see if they do what they should. If not, check with "xev" to see what X thinks about them.

    4. Ctrl-C to stop it, then put xbindkeys in the background by running it thusly:

    $ xbindkeys

    5. Try various programs (Firefox, OO.org, etc.) and if satisfied with the configuration, add xbindkeys to your session startup (depends on the WM in use).

    Enjoy!

    =============================

    Hope this helps, at least until a proper multiple-input configuration is available in KDE/Gnome (something to encompass everything from keyboards and mice to joysticks and remotes)... may take a while

    P.S.: You can't do this in Windows actually. Even using the Logitech SetPoint software, you are limited in the types of commands you can assign (for example, in order to set the "Search button" to be middleclick, ironically I had to manually edit an XML file)... so Linux is more customizable, albeit not very friendly.

    Regards,
    Mihnea

    Edited to add some configuration hints
    Last edited by mgc8; October 23rd, 2008 at 02:29 PM.

  5. #1135
    Join Date
    Feb 2007
    Beans
    68

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

    Great! The only thing that was going to keep me off 8.10 was this, I'll install it in a VM to see how it works

  6. #1136
    Join Date
    Apr 2007
    Location
    Washington state
    Beans
    350
    Distro
    Ubuntu Development Release

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

    Quote Originally Posted by mgc8 View Post
    It is indeed unfortunate that btnx is no longer working, however configuring with xbindkeys is not impossible. Here is a small HOWTO, I managed to get the same functionality out of my MX Revo that I had with btnx:

    =============================

    0. Note: this requires a newer version of X and the kernel, therefore a recent Intrepid Ibex. Older versions do not see all the mouse buttons correctly (but you can use btnx there).

    1. Install needed programs: xbindkeys and xmacro (use your favourite package manager instead of aptitude):

    $ sudo aptitute install xbindkeys xmacro

    2. Configure xbindkeys:

    $ nano ~/.xbindkeysrc

    #==============#
    "echo 'ButtonPress 2 ButtonRelease 2' | xmacroplay :0"
    c:0xE1

    "echo 'KeyStrPress Control_L KeyStr KP_Add KeyStrRelease Control_L' | xmacroplay :0"
    b:13

    "echo 'KeyStrPress Control_L KeyStr KP_Subtract KeyStrRelease Control_L' | xmacroplay :0"
    b:15

    "echo 'KeyStrPress Shift_L KeyStr Right KeyStrRelease Shift_L' | xmacroplay :0"
    b:17
    #==============#

    (you can also use "xbindkeys --defaults" to create a default config file, just remember to comment out those default settings)

    Customize the setup to suit your needs -- in my case, I have assigned the thumb wheel to Ctrl-+ and Ctrl-- (enlarge/shrink fonts in Firefox, Konsole, OO.org) and the thumb wheel click to Shift-Right (handy in Konsole/Firefox to switch tabs quickly); I also set the little "search" button as middle click as I find it a lot more convenient than clicking the wheel.

    The configuration basically entails two lines: the first contains the command to execute (in our case, the keys to send when a specific button is pressed) and the second line contains the trigger (in our case, the mouse button we want to assign to a task). In the above example, "c:0xE1" means "keycode 225" (hexa) -- the "search button", and "b:13" means "mouse button 13" (that's how X sees it via "xev"). Check out the xbindkeys man page or the default config file for more information.

    When adding/removing keys and mouse buttons to xmacroplay, remember to always give the "xxxRelease" event also, otherwise the key/button will remain pressed and strange things will happen!

    3. Test the settings:

    $ xbindkeys -n -v

    This should keep the program running on the terminal, and you can press the various buttons and see if they do what they should. If not, check with "xev" to see what X thinks about them.

    4. Ctrl-C to stop it, then put xbindkeys in the background by running it thusly:

    $ xbindkeys

    5. Try various programs (Firefox, OO.org, etc.) and if satisfied with the configuration, add xbindkeys to your session startup (depends on the WM in use).

    Enjoy!

    =============================

    Hope this helps, at least until a proper multiple-input configuration is available in KDE/Gnome (something to encompass everything from keyboards and mice to joysticks and remotes)... may take a while

    P.S.: You can't do this in Windows actually. Even using the Logitech SetPoint software, you are limited in the types of commands you can assign (for example, in order to set the "Search button" to be middleclick, ironically I had to manually edit an XML file)... so Linux is more customizable, albeit not very friendly.

    Regards,
    Mihnea

    Edited to add some configuration hints
    I did the same thing and it worked fine. One other thing if you have the MX revo. If you used revoco in btnx, you can install that separately and get the same functionality in intrepid. I like the speed sensitive release of the "clicks" on the wheel and with revoco, if I spin it fast, it releases and freewheels which makes it nice for scrolling to the bottom of a long page.

  7. #1137
    Join Date
    May 2008
    Beans
    22

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

    I tested this all day, and I found some quirks with the setup above. Apparently the "xmacroplay" program is very old -- it's been un-maintained for about 8 years... And it has some annoying bugs, namely the last key is sometimes not read correctly. As it happens, that is usually the "KeyRelease" event, and therefore sometimes the Shift key would get stuck because of this, leading to very annoying problems.

    A workaround would be to add another "benign" key after the real ones, but that's kindof ugly and no guarantee of trouble-free operation.

    So I dug up another way to solve the issue, unfortunately slightly more convoluted.

    ===============

    1. A few new programs are needed for this, namely xkbset and xvkbd. The usual

    $ sudo aptitude install xkbset xvkbd

    should work.

    2. xbindkeys remains the main helper here, but the configuration will be changed thusly:

    #==============#
    "/usr/bin/xvkbd -text '\[Control_L]\[+]'"
    b:13

    "/usr/bin/xvkbd -text '\[Control_L]\[-]'"
    b:15

    "/usr/bin/xvkbd -text '\[Shift_L]\[Right]'"
    b:17
    #==============#

    3. As you can see, we've mapped the mouse buttons to keypresses as before, but unfortunately we can't do it the other way round with xvkbd (at least I wasn't able to find a way) so remapping the "search button" is more problematic. What I came up with is a series of kludges:

    3.a) set the key to report "Pointer_Button2" via xmodmap:

    $ xmodmap -e 'keycode 225 = Pointer_Button2'

    3.b) however, X won't honor this unless "MouseKeys" is turned on (an Accessibility feature). Thus:

    $ xkbset m

    3.c) this unfortunately also turns on the "use keypad as mouse" feature, making the keypad useless. Here comes the kludge:

    Turn off "MouseKeys" via shortcut: LeftShift+LeftAlt+NumLock

    3.d) at this point, the search button should still work as middleclick, and the keypad should be ok.

    ===============

    We really need a better way of handling the "map keypress to mouse button" problem. So far it seems a dead end, but I'd be happy for any suggestions that would make the above hacks obsolete.

    So there you have it, after a day's work, the functionality of btnx can be duplicated... somewhat. Oh well, at least it can be done

  8. #1138
    Join Date
    Oct 2008
    Location
    England
    Beans
    960
    Distro
    Ubuntu 8.04 Hardy Heron

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

    Yeah, that's the method I used before using Btnx. It's Ok but let's not mention the hours of messing with Xev to get a working modmap string.

  9. #1139
    Join Date
    Sep 2006
    Beans
    112

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

    I cannot work without btnx! I have gotten so used to all the mouse buttons being configured by btnx that when I upgrade to a new version of ubuntu I find it difficult!
    So... 8.10 is out and I am running 64-bit version. I tried to compile it from scratch but it failed. Any idea when you will make btnx available for Intrepid?

  10. #1140
    Join Date
    Apr 2007
    Location
    Washington state
    Beans
    350
    Distro
    Ubuntu Development Release

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

    Quote Originally Posted by maxxum View Post
    I cannot work without btnx! I have gotten so used to all the mouse buttons being configured by btnx that when I upgrade to a new version of ubuntu I find it difficult!
    So... 8.10 is out and I am running 64-bit version. I tried to compile it from scratch but it failed. Any idea when you will make btnx available for Intrepid?

    There is an earlier thread on this. It will not be updated for Intrepid. The way that mouse keys are detected is different for intrepid and it is not compatible with btnx. You have to use evdev and xbindkeys to mostly duplicate the functionality. If you have an mx revolution mouse, you can also run revoco to get the free wheeling wheel.

Page 114 of 128 FirstFirst ... 1464104112113114115116124 ... 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
  •