Just a quick suggestion: Could you add an instruction on the first post to add btnx to the startup sessions? It was something that I didn't immediately realize.
Just a quick suggestion: Could you add an instruction on the first post to add btnx to the startup sessions? It was something that I didn't immediately realize.
pmaconi, not sure if you need to know (or just want it on the front page) how to add it to sessions, but it worked for me using "sudo btnx".
On a side note, is there a way to force X to stop reading my MX 1000's middle thumb button as "Mouse 3". I assume I can use xmodmap for this? What would be a good setting to use? (Never used xmodmap before).
My goal really is simply to have this thumb button count as clicking "shift", which is working at the moment, except it also counts is clicking "mouse 3" + shift. Which doesn't quite work for WoW, since button 3 makes you walk forward!
I am fairly sure that I was able to configure the mouse wheel click using xbindkeys in 7.10 - I'm not sure if it will translate correctly to 8.04, but I don't see why it wouldn't. There is documentation towards the bottom of this guide.
Also, btnx (without sudo) works fine as a command in sessions. I just think it should be on the front page.
Hmm, using xev it appears that both clicking down the wheel, and clicking the middle thumb button appears to be giving me "button 2". Is there a way to fix that? (MX 1000 mouse if that helps)
Here's what I have in xorg.conf
EDIT: I got it working now =)Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "Buttons" "12"
Option "ZAxisMapping" "4 5 7 6"
Option "Emulate3Buttons" "false"
EndSection
.Xmodmap
pointer = 1 21 3 4 5 9 7 8 6
Using lower numbers was giving me a lot of weird results, so I just put in a higher value and it automagically fixed itself. Yay!
Last edited by oni5115; May 6th, 2008 at 12:48 AM. Reason: figured it out
I'm not sure, but have you tried setting Emulate3Buttons to true and seeing what happens? Or adding Option "ChordMiddle" (the only description of this toggle that I found was that it is for some 3-button logitech mice)?
I've been trying to setup btnx to do _exactly_ what I want, and have been unable to. First, this is what I want to accomplish:
I have an mx1000 mouse, and I'd like to have the 3 thumb buttons perform the shift, control, and alt keyboard events, the scroll buttons perform the "control + [" and "control + ]" keyboard combinations, and the rest of the buttons perform their "normal" functions as they appear when using the evdev driver, namely, buttons 1-7.
In order to even get btnx to recognize my mouse, I had to completely disable evdev. I'd really like to know how all these other people are claiming to use btnx AND evdev, when they are entirely incompatible, as btnx wants to read the mouse device directly, and so does evdev (from what I understand). Anyhow, once I got the mouse configured with the "mouse" xorg driver, using protocol "auto", which detected it as "ExplorerPS/2", I was able to have btnx detect the mouse and all its 12 buttons.
The problems begin here. It's a bit hard to explain, so please bear with me. This is what I've observed, after extensive trial and error: Once btnx works, and the "mouse" driver (Option "driver" "mouse") is configured, X only "sees" 7 mouse buttons, even though Xorg.0.log reports 9. In this state, btnx can only generate events for the mouse buttons X "sees". In other words, say I tell btnx to issue the BTN_8 event. Nothing happens for this event. But if I tell btnx to generate the BTN_0 event, mouse button 1 will be seen (when using xev to monitor events). Adding a Option "buttons" "12" into xorg.conf does nothing to change this, even though Xorg.0.log reports more buttons. Additionally, some buttons generate duplicate button events (2 buttons will send mouse button 6, for example).
My goal is simple: I'd like for the X mouse driver to handle the x and y axes of the mouse, and btnx to generate ALL mouse button events. If X cannot be configured to prevent the mouse driver from sending the "native" mouse events to X, this can easily be worked around by remapping these native buttons to high button numbers with xmodmap. As long as btnx can still send buttons 1 through 7, it should still work as I'd like.
My question is: How can this be done? I've tried several methods, from creating 2 mouse devices in xorg.conf, to mapping the event devices btnx creates directly as mouse devices, all while doing extensive trial and error, process of elimination testing within btnx.
I think that the solution lies in being able to map ANY mouse button, from 1 to 32, using btnx, regardless of what X seems to think is available. From what I can tell, this has to be done at the xorg.conf/driver level.
Thoughts?
Daniel
Last edited by tim71; May 6th, 2008 at 10:54 AM.
When I was first getting btnx to work, I would have sworn that it didn't start on startup (hotplugging worked immediately, but the buttons weren't responsive if the computer started while the mouse was plugged in). However, when I just tested everything, it all works fine. I guess I'm just crazy.
It did the same to me. But then I noticed that now my zoom buttons on my MX600 adjust the volume without btnx running. In fact xev says that a few of my buttons are mapped to keyboard keymap. So with btnx running I get things zooming AND my volume being adjusted with my zoom buttons. it's very annoying...
Plus I noticed that one of my handlers is kbd
H: Handlers=kbd mouse1 event6
When I hotswapped my old mouse out and this mouse in it all worked fine. This all happened after I restarted.
After some further testing, I can be a bit more specific. Even though 9 buttons are detected, only buttons 1-5 and 8 and 9 are producible by the mouse, and therefore available to btnx. By using the BTN_X keycodes in btnx-config, I can make any button on the mouse replicate these existing mouse button events, but no others. Many applications use buttons 6 and 7 for horizontal scrolling. Gtk and Qt applications, for example.
If only I could get buttons 6 and 7 to be "available", I could accomplish my goal.
Bookmarks