PDA

View Full Version : btnx: Send keyboard and mouse combination events with mouse buttons


Pages : 1 [2] 3 4 5 6

rzj
July 2nd, 2007, 12:55 PM
I can't seem to reproduce this problem. Does it happen every time for you?

I tried it 3 or 4 times. The first time, I was clicking repeatedly and thought maybe I'd overflowed a buffer before it could say - "stop", but the subsequent times I did individual clicks till the progress bar filled, so I assume it was when the program went on to the next stage. This occurs on the first button I use - the left button. I haven't tried using a different button to see if that changes anything. I guess there is always the risk with left button that there could be an interaction with the X messages going to the program as a result of mouse clicks - maybe I should use a button that doesn't do anything at present to simplify what is going on.

I have an idea where the problem is based on the output, and added one more check, but I can't confirm if it fixes it.

I'll try again in a few hours when I'm at home.

Do I just use the same wget line for the new version or is the version number updated from 0.1.1 ?

Ray

daou
July 2nd, 2007, 01:07 PM
I tried it 3 or 4 times. The first time, I was clicking repeatedly and thought maybe I'd overflowed a buffer before it could say - "stop", but the subsequent times I did individual clicks till the progress bar filled, so I assume it was when the program went on to the next stage. This occurs on the first button I use - the left button. I haven't tried using a different button to see if that changes anything. I guess there is always the risk with left button that there could be an interaction with the X messages going to the program as a result of mouse clicks - maybe I should use a button that doesn't do anything at present to simplify what is going on.



I'll try again in a few hours when I'm at home.

Do I just use the same wget line for the new version or is the version number updated from 0.1.1 ?

Ray

Yes, just wget 0.1.1. I tried clicking as fast as I could (until my index finger was numb :D), but I didn't get the same error. It shouldn't be possible to overrun the input buffer. It's size is static, but it only reads as many bytes as the buffer can hold. The process forks a child to read the handler, and then sends a message to the child to stop when enough clicks have been detected.

And the seg fault happened after the program stops reading the input handler (the output says that it terminated the child, meaning the child has already exited and done so without being forced, meaning it exited gracefully). This means no one could possibly be reading the input handler. So it is either an invalid free after the child exit (possibly when trying to clean up the interthread-pipes), or when the program tries to save information about the button (actually it just enables you to save the information at that point, but doesn't save anything until you name and add the button).

daou
July 2nd, 2007, 01:32 PM
btnx-0.2.13 adds support for Logitech Cordless Click Plus (check FAQ section first). Thanks to rzj for hexdumping (let me know if everything is working correctly).

daou
July 2nd, 2007, 02:31 PM
rzj,

Please use 0.1.2
It adds a handler for segmentation faults, and dumps the core into your terminal. This will give me a better idea where the error occurs.

rzj
July 2nd, 2007, 02:47 PM
Yes, just wget 0.1.1. I tried clicking as fast as I could (until my index finger was numb :D), but I didn't get the same error. It shouldn't be possible to overrun the input buffer. It's size is static, but it only reads as many bytes as the buffer can hold. The process forks a child to read the handler, and then sends a message to the child to stop when enough clicks have been detected.

And the seg fault happened after the program stops reading the input handler (the output says that it terminated the child, meaning the child has already exited and done so without being forced, meaning it exited gracefully). This means no one could possibly be reading the input handler. So it is either an invalid free after the child exit (possibly when trying to clean up the interthread-pipes), or when the program tries to save information about the button (actually it just enables you to save the information at that point, but doesn't save anything until you name and add the button).

Seems to crash less often but still does.

Attached file was just pressing the "window" button

I have explorer ps2 set in my xorg.conf should I change this?

I did try, as suggested on several posts, changing the driver to evdev but that just failed on startx. But it occurred to me that I didn't know if btnx-config made any assumptions about the driver used - or if I need evdev to cope with my usb cordless receiver.

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "ZAxisMapping" "4 5"
Option "ButtonMapping" "1 2 3 6 7 8 9 10 11 12 13 14"
Option "Emulate3Buttons" "false"
Option "Buttons" "14"
EndSection

Ray

daou
July 2nd, 2007, 02:51 PM
Seems to crash less often but still does.

Attached file was just pressing the "window" button

I have explorer ps2 set in my xorg.conf should I change this?

I did try, as suggested on several posts, changing the driver to evdev but that just failed on startx. But it occurred to me that I didn't know if btnx-config made any assumptions about the driver used - or if I need evdev to cope with my usb cordless receiver.

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "ZAxisMapping" "4 5"
Option "ButtonMapping" "1 2 3 6 7 8 9 10 11 12 13 14"
Option "Emulate3Buttons" "false"
Option "Buttons" "14"
EndSection

Ray

Version 0.1.2 didn't give you anymore output? I made a minor modification to 0.1.1, and updated the version. It should have printed a whole bunch of memory addresses etc.

There is a link to a working xorg.conf file in the Troubleshooting section of the first post, but I doubt this has anything to do with it.

rzj
July 2nd, 2007, 03:15 PM
Version 0.1.2 didn't give you anymore output?


STOP PRESS!

Didn't see your post re 0.1.2 only the one to reuse 0.1.1

....
back soon

Ray

rzj
July 2nd, 2007, 03:25 PM
OK, new output file from 0.1.2

re your comment about xorg.conf not mattering, In its earliest form, I got nothing for the fwd/back buttons so I thought I would need something that worked to let btnx-config see the events - or are they picked up at a lower level before any xorg related drivers get in the act?

My tilt right does not seem to be seen by btnx-config at all, and when I was dumping stuff at low level before it seemed to be sending a code that was being interpreted as a keypress, not a mouse event.

Ray

daou
July 2nd, 2007, 03:32 PM
OK, new output file from 0.1.2

re your comment about xorg.conf not mattering, In its earliest form, I got nothing for the fwd/back buttons so I thought I would need something that worked to let btnx-config see the events - or are they picked up at a lower level before any xorg related drivers get in the act?

My tilt right does not seem to be seen by btnx-config at all, and when I was dumping stuff at low level before it seemed to be sending a code that was being interpreted as a keypress, not a mouse event.

Ray

Yes, your xorg.conf is important when using btnx. I was referring to this crash problem. Actually, what's important in the xorg.conf file is to make it as simple as possible. You don't want xserver to interpret anything other than mouse movement, L+R+M buttons, and up+down scrolls. Although, btnx could handle even those if needed. This is because btnx looks at the raw input data stream before your xserver gets it. It augments what your xserver and window managers cannot accomplish.

And it still didn't output any of the output I was expecting. This is a strange error.

rzj
July 2nd, 2007, 04:09 PM
It seems the crashing is fairly random - I thought at first it was certain buttons that caused it, so I tried to capture just a few and then save the config file. That worked as each time it crashed I could restart it and carry on from where I left off. In fact all of the buttons have been captured after about 5 runs of the program.

Both left and right tilt are sending multiple events - in both cases it offered me a choice of two codes each with 6 events (the progress bar kept stepping up and back down each click then the dialog came up to choose).

The caption says to try one and then if that doesn't work to try the other. I'm not sure how you would do that as I could not see a mechanism to delete a single button entry.

When I tried capturing the same one again it kept telling me I had already captured a button, but it also gave me progress and then offered me several choices - one with lots of events and a couple with one or two. They may have been scroll but I think it would have discarded those as it already had them in the list. [edit - I think these were actually other buttons that I tried and got the "already mapped" type answer - I hadn't realised it was storing these in th elist for possible selection till I spotted the TRUE entries in the selection list]

Now I've got a config file I'm not sure what to do with it - does that have to wait till you update it to integrate with btnx? Is the btnx-config-test compatible so should I just rename it without the test on the end and restart btnx?

(I'll go back now and read the thread pages to see if there's something on that)

Anyway I've attached my btnx-config-test in case that's any use to you. It has two entries each for left and right tilt, but I guess both would be triggered each time the control was used??

Ray

rzj
July 2nd, 2007, 04:16 PM
I just had a look at the config file at the 2 entries for tilt left and right, and I noticed that one pair looks similar to a button code, while the other looks similar to a scrollwheel code with both having the value 0 or -1 in the fourth byte, and the same code in the third byte. It's as if you are meant to be able to use the first type if you treat them as separate functions, and the second if it is to be a +/- type of use like scrolling.

Ray

daou
July 2nd, 2007, 04:18 PM
I think I know where the problem is... at least I found one, hopefully it's the one that's crashing your btnx-config

Try deleting the line "ip_pipe_free_bypid(pid)" in threads.c
It's the 76th line in the file.

Then make again and run it.

daou
July 2nd, 2007, 04:30 PM
Both left and right tilt are sending multiple events - in both cases it offered me a choice of two codes each with 6 events (the progress bar kept stepping up and back down each click then the dialog came up to choose).

The caption says to try one and then if that doesn't work to try the other. I'm not sure how you would do that as I could not see a mechanism to delete a single button entry.


You are right, the button deletion still needs to be implemented.


When I tried capturing the same one again it kept telling me I had already captured a button, but it also gave me progress and then offered me several choices - one with lots of events and a couple with one or two. They may have been scroll but I think it would have discarded those as it already had them in the list. [edit - I think these were actually other buttons that I tried and got the "already mapped" type answer - I hadn't realised it was storing these in th elist for possible selection till I spotted the TRUE entries in the selection list]


Your edited comment is correct. It stores each code that it detects, but only lets you assign one that hasn't been assigned before. This is to prevent you from getting multiple events with btnx.


Now I've got a config file I'm not sure what to do with it - does that have to wait till you update it to integrate with btnx? Is the btnx-config-test compatible so should I just rename it without the test on the end and restart btnx?

(I'll go back now and read the thread pages to see if there's something on that)


This is still just a test version (and as you and I have both seen, for a good reason). btnx will not work with the config file yet (technically it will, but only for mice that btnx already supports. So this would be considered a "hack").


Anyway I've attached my btnx-config-test in case that's any use to you. It has two entries each for left and right tilt, but I guess both would be triggered each time the control was used??

Ray

Yes, you would get multiple events, and this is why there's that dialog that lets you choose rawcodes, and tells you to try a different one if that one doesn't work correctly.

rzj
July 2nd, 2007, 04:31 PM
I think I know where the problem is... at least I found one, hopefully it's the one that's crashing your btnx-config

Try deleting the line "ip_pipe_free_bypid(pid)" in threads.c
It's the 76th line in the file.

Then make again and run it.

I think that's it - I cleared the config and did the whole thing again and didn't get any failures.

Ray

daou
July 2nd, 2007, 04:35 PM
I just had a look at the config file at the 2 entries for tilt left and right, and I noticed that one pair looks similar to a button code, while the other looks similar to a scrollwheel code with both having the value 0 or -1 in the fourth byte, and the same code in the third byte. It's as if you are meant to be able to use the first type if you treat them as separate functions, and the second if it is to be a +/- type of use like scrolling.

Ray

It gets a bit technical, and my understanding is limited to what I've learned by looking at the kernel source code for the input interface. But yes, rawcodes that start with 0x02 are relative events (scroll wheels) and ones that start with 0x01 are key events. This is important information for btnx, because both need to be handled differently. Relative events do not report a button down and button up signal. They just say that a relative motion happened. So, if you want to bind a relative event to a key combination, there's a problem. Key's are by nature in an on or off state. So btnx emulates the necessary up and down signals for relative events.

daou
July 2nd, 2007, 04:41 PM
I think that's it - I cleared the config and did the whole thing again and didn't get any failures.

Ray

The good news is that the problem is isolated. Bad news is, I still have to fix the actual problem ;). By taking that line away, a memory leak is introduced into btnx-config. The size and meaning of the leak is so small that it doesn't matter to the end user, but to a programmer, it means the program is unreleasable.

The problem is a bit complicated. It's possible for the parent process to be reading a pipe, data from the child, when the child exits. The parent process is interrupted, and the pipe is closed and freed. When the parent continues reading it, and gets slapped with a segmentation fault.

But thanks for being patient and helping find the bug.

rzj
July 2nd, 2007, 04:59 PM
It's possible for the parent process to be reading a pipe, data from the child, when the child exits.

I'm obviously not aware of all the facts here, so this may make no sense, but could you not ensure that the child sends a particular packet of data through the pipe that warns the parent that it is about to exit? Or alternatively the child doesn't kill itself but sends a "kill-me" message to the parent?

But thanks for being patient and helping find the bug.

No problem :D

daou
July 2nd, 2007, 05:25 PM
I'm obviously not aware of all the facts here, so this may make no sense, but could you not ensure that the child sends a particular packet of data through the pipe that warns the parent that it is about to exit? Or alternatively the child doesn't kill itself but sends a "kill-me" message to the parent?

Actually, it almost does this already. The parent sends a message to the child: please kill yourself. The child only exits unexpectedly on an error... but that's a good question. Why is the parent trying to read the pipe if it's already sent a please exit message...

rzj
July 2nd, 2007, 05:57 PM
Actually, it almost does this already. The parent sends a message to the child: please kill yourself. The child only exits unexpectedly on an error... but that's a good question. Why is the parent trying to read the pipe if it's already sent a please exit message...

Sounds like something asynchronous where it crashes only if both processes happen to be doing something at the same time. Remember that you understand how it is supposed to work, but your users (me?) may do something slightly differently through not understanding fully that will show up a vulnerability.

Could the child be in the process of sending another data packet at the same time as the parent decides to kill it - I'm thinking particularly of my mouse where it sends two messages for one click, although it definitely crashed before on right button which is a single click.

Anyway I'll shut up with the wild speculation - if you want to build a version with some more instrumentation I'm happy to run it for you since you can't reproduce the fault.

Ray

Edit - but I'm off to bed now so it won't be till tomorrow evening.

KaMZaTa
July 2nd, 2007, 07:42 PM
I'd like translate it to italian. How can I do?

tim71
July 2nd, 2007, 07:59 PM
I have no clue what could be causing this. btnx shouldn't be in any way linked to boot time framebuffer sizes. Maybe the framebuffer option causes something in the input system to change?
To be exact - this is not a "boot-time only" thing - if you change to tty1...6 with Ctrl+Alt+F1...F6 then the console screen has different resolution, then default one.

P.S. Sometimes btnx even worked without a problem with vga=791 (1024 x 768 resolution), but mostly not, if I recall corectly. Without this option in GRUB menu all works without problems.

daou
July 3rd, 2007, 01:11 PM
btnx-config-0.1.3 tries to fix the crash bug during button detection.
Instead of freeing the communication pipes during child exit, the parent simply flags them as obsolete and continues. A timer then periodically checks for any obsolete pipes and frees as necessary. And a whole bunch of checks have been added.

daou
July 3rd, 2007, 01:13 PM
I'd like translate it to italian. How can I do?
If you are referring to btnx-config, sure. But first I need to get the program fully functional. Once that is done, I'll try to add support for translations.

rzj
July 3rd, 2007, 04:37 PM
btnx-config-0.1.3 tries to fix the crash bug during button detection.
Instead of freeing the communication pipes during child exit, the parent simply flags them as obsolete and continues. A timer then periodically checks for any obsolete pipes and frees as necessary. And a whole bunch of checks have been added.

Tried all the buttons three times through, no crashing. Seems stable to me.

Ray

imperialline
July 3rd, 2007, 08:45 PM
Thumb wheels:

Hi daou,

Having played around with the btnx and the MX revolution in the past few days on AMD64, I have found that everything works beautifully except the thumbwheels' behaviors.

I use xev and also do some debuggings under gdb and here are what I have found:

1) Clicking on the Thumb Wheel Forward produces button 9 and 3 event presses and releases. So it will genrate 2 separate actions based on 2 distinct button 9 and button 3 clicks
2) Click on the Thumb Wheel Backward generates button 8 and 2 event presses and releases. So it will genrate 2 separate actions based on 2 distinct button 8 and button 2 clicks.
4) Sometimes one click generates a spurious sequence of (1) or (2) mentioned above although btnx recognizes as one click
4) Btnx appears to do eveverything correctly but somehow the we still have the problem. I guess that this could be a mouse driver problem.

I.

tim71
July 5th, 2007, 12:19 PM
Update - I think, that I managed to find at least some kind of a solution. I got the lomoco package and issued
sudo lomoco --no-smswhich disabled the smart-scroll and other additional events for some of the additional keys - needs more testing though...
Had to add this line to /etc/rc.local because it needs to be re-applied after restart.
Now I found a bit more elegant way to do the same thing - just add the following line to /etc/default/lomoco
LOGITECH_MOUSE_DISABLE_CC=yes
and the rc.local entry is no longer needed

daou
July 6th, 2007, 04:36 AM
btnx-0.2.14 adds support for MS Intellimouse Explorer 2.
Thanks to glave for doing the hexdumping.

casell
July 6th, 2007, 05:12 AM
Sorry daou i didn't have much time in this period!

I tried btnx-config a little. and i obviously have something to say! :P

1) I got an error (handled) with btnx daemon on, it would be good that the config apps shuts down the daemon or, even better in my opinion, have the config app ignore btnx "fake" devs

2) Then please transform the keycode selectbox in a combo so one can search in it and save his/her eyes! :D

3) Add an accelerator to the top button in all the mouse detection "wizard" or even better prevent other things to steal the focus! The workflow for me should be:
a) Focus on start button detection
b) Focus on stop button detection (here is to decide cause it may be cause of human's error, maybe it's better to add an accelerator only for the Stop action, so the user need to think about stop)
c) Focus on text box
d) At click to Add button, give back focus to start button detection

4) Minor one: in main window the Configuration File Clear Button has ALT+C as shortcut and guess what is the shortcut for the Close Button (yes it's ALT+C) :P

5) In the last version the logo path is hardcoded in widgets.c line 52

I was thinking about making a QT/KDE version of btnx-config in Python for those poor Kubuntu users (like me :D), but i'm going to wait until feature and appearence freeze to make it similar to GTK one.

While waiting and testing I'll try to figure out a way to get correct mouse in case of same VID & PID.

Bye and good work!

daou
July 6th, 2007, 06:23 AM
Sorry daou i didn't have much time in this period!

I tried btnx-config a little. and i obviously have something to say! :P

1) I got an error (handled) with btnx daemon on, it would be good that the config apps shuts down the daemon or, even better in my opinion, have the config app ignore btnx "fake" devs

2) Then please transform the keycode selectbox in a combo so one can search in it and save his/her eyes! :D

3) Add an accelerator to the top button in all the mouse detection "wizard" or even better prevent other things to steal the focus! The workflow for me should be:
a) Focus on start button detection
b) Focus on stop button detection (here is to decide cause it may be cause of human's error, maybe it's better to add an accelerator only for the Stop action, so the user need to think about stop)
c) Focus on text box
d) At click to Add button, give back focus to start button detection

4) Minor one: in main window the Configuration File Clear Button has ALT+C as shortcut and guess what is the shortcut for the Close Button (yes it's ALT+C) :P

5) In the last version the logo path is hardcoded in widgets.c line 52

I was thinking about making a QT/KDE version of btnx-config in Python for those poor Kubuntu users (like me :D), but i'm going to wait until feature and appearence freeze to make it similar to GTK one.

While waiting and testing I'll try to figure out a way to get correct mouse in case of same VID & PID.

Bye and good work!

Excellent feedback! Thanks :D.

1) Good observation. This has already been fixed last night. btnx now reserves a vendor ID of b216, and the mouse detection ignores it. However, I haven't released the latest btnx-config (0.1.4) that does this (must have btnx-0.2.14 to register the correct btnx vendor and product IDs).

2) I've been thinking about this since I first made the combobox ;). I'll change it, but it is a lower priority at the moment.

3) I'll do as you suggest.

4) Actually, this is also dependent on what language you are running btnx with. It's impossible to predict if some buttons will have accelerator overlaps or not.

5) It will be fixed soon. And, as I'm writing this, I'm looking at making .desktop files and correct icons+paths for btnx icons.

Some other things that are in 0.1.4: internationalization support, tooltips, a new delay value (not supported by btnx yet), and button deletion. And some other minor bug fixes.
I need to polish up the makefiles for 0.1.4 before I'll release it (the SVN, of course, is open to anyone to get the latest. If someone does, please use "make debug" to build it. "make all" doesn't work yet).

And I'm glad you think btnx-config is worth porting to QT. It probably won't be simple, so I commend you for it! Actually, I started making some wrapper macros for things like setting label and button texts (SET_LABEL_TEXT()). These might be really useful if you are porting to QT. Unfortunately, only the newest code bits use them. If you think these will help in QT, I could try updating the code to use more wrappers (and make more wrappers) in GTK specific calls. The look will be frozen when btnx-config-0.2.x is released, so be on the lookout for it.

Spudgun
July 6th, 2007, 06:55 AM
Worked great, and now I can tilt my mouse wheel left and right to go back and forward in Firefox, hurrah!

tim71
July 6th, 2007, 01:43 PM
Now I found a bit more elegant way to do the same thing - just add the following line to /etc/default/lomoco
LOGITECH_MOUSE_DISABLE_CC=yes
and the rc.local entry is no longer needed
Damn- seems like I have to take this suggestion back...

daou
July 6th, 2007, 02:47 PM
EDIT: Deleted. No longer necessary. Howto has changed to include btnx-config.

silentstorm
July 7th, 2007, 09:33 AM
Works great for me!!

thx

daou
July 9th, 2007, 10:37 AM
Thumb wheels:

Hi daou,

Having played around with the btnx and the MX revolution in the past few days on AMD64, I have found that everything works beautifully except the thumbwheels' behaviors.

I use xev and also do some debuggings under gdb and here are what I have found:

1) Clicking on the Thumb Wheel Forward produces button 9 and 3 event presses and releases. So it will genrate 2 separate actions based on 2 distinct button 9 and button 3 clicks
2) Click on the Thumb Wheel Backward generates button 8 and 2 event presses and releases. So it will genrate 2 separate actions based on 2 distinct button 8 and button 2 clicks.
4) Sometimes one click generates a spurious sequence of (1) or (2) mentioned above although btnx recognizes as one click
4) Btnx appears to do eveverything correctly but somehow the we still have the problem. I guess that this could be a mouse driver problem.

I.

You could try testing btnx 0.3 with btnx-config... and set the delay value accordingly. This will prevent btnx from sending that key event multiple times during the delay time.

daou
July 9th, 2007, 10:40 AM
Damn- seems like I have to take this suggestion back...

Didn't work?

If you have time, you could make a quick list of steps to go through in order to get lomoco working with the mice that need it. I could then add it to the troubleshooting section.

daou
July 9th, 2007, 10:41 AM
Works great for me!!

thx

No problem. Good to hear :-D.

daou
July 9th, 2007, 10:43 AM
To anyone that has tested btnx 0.3 with btnx-config:

tell me if it's working. If not, what is going wrong so I can fix what needs to be fixed. Once everything is working, I'll make a debian package and release it.

daou
July 9th, 2007, 12:44 PM
I suggest people post their favorite keyboard combinations on this post. It might help other people to easily find the combos they need. In fact, I might learn something new myself ;).

visik7
July 9th, 2007, 02:51 PM
I got btnx 0.3 an btnx-config works
but I've a problem my 5 extra buttons mapped by btnx are also mapped from the Xorg standard protocol (ImPS/2) I've tried to set it to auto like the thread say but nothing to do btnx generete events but also the Xorg driver generate events so it's all messed up how can I fix ?
I've also tried to set Option Buttons 5 into the Xorg input section but the problem persist.
HELP

daou
July 9th, 2007, 03:17 PM
I got btnx 0.3 an btnx-config works
but I've a problem my 5 extra buttons mapped by btnx are also mapped from the Xorg standard protocol (ImPS/2) I've tried to set it to auto like the thread say but nothing to do btnx generete events but also the Xorg driver generate events so it's all messed up how can I fix ?
I've also tried to set Option Buttons 5 into the Xorg input section but the problem persist.
HELP

You could try using the most basic PS/2 protocols: "PS/2" or "GenericPS/2"
This will mean you lose functionality on even the scrollwheel.
But you can then use btnx to handle even the scrollwheels by binding the scrollwheel events to REL_WHEELFORWARD and REL_WHEELBACK keycodes.

visik7
July 9th, 2007, 03:23 PM
nothing to do I loose the wheel as you predicted but it still bind other extra keys
I think could be hidd that do it
have you other clue?

daou
July 9th, 2007, 03:40 PM
nothing to do I loose the wheel as you predicted but it still bind other extra keys
I think could be hidd that do it
have you other clue?

Did you try making your xorg.conf look a bit more like the one described in this post:

http://ubuntuforums.org/showpost.php?p=2761505&postcount=54

The other important values (than the protocol) are the driver and the device /dev/psaux

visik7
July 9th, 2007, 03:47 PM
Did you try making your xorg.conf look a bit more like the one described in this post:

http://ubuntuforums.org/showpost.php?p=2761505&postcount=54

The other important values (than the protocol) are the driver and the device /dev/psaux

done
nothing to do :(
probably the only way is to write something that read directly from bluetooth instead of event interface generated by hidd
I'm sad

daou
July 9th, 2007, 03:54 PM
done
nothing to do :(
probably the only way is to write something that read directly from bluetooth instead of event interface generated by hidd
I'm sad

Does your mouse directly interface with bluetooth on your computer? Or does it use a USB->Bluetooth adapter? Because many mice, like mine, do this. And in that case, it wouldn't be hidd's problem.

You don't have any old configurations from previous howto's to get the mouse buttons to work, do you? Because these will be a problem as well, especially if you've made udev rules.

If I come up with something else, I'll pm you.

visik7
July 9th, 2007, 04:01 PM
no I've removed all the xmodmaps around
and yes I use mouse directly connected to my laptop via hidd
I don't use the base station 'couse this is a laptop with integrated bt and I like to not plug anything to get the mouse working.
and I use hidd --connect <mouse_macaddress> to get the mouse sync with the pc

daou
July 9th, 2007, 04:08 PM
no I've removed all the xmodmaps around
and yes I use mouse directly connected to my laptop via hidd
I don't use the base station 'couse this is a laptop with integrated bt and I like to not plug anything to get the mouse working.
and I use hidd --connect <mouse_macaddress> to get the mouse sync with the pc

In this case, I'd say it's hidd thats causing the problem. Well, actually it's doing everything right by recognizing those buttons. It's unfortunate that window managers lack the ability to bind all those buttons. I don't have any experience with hidd so I can't really say what should be done. I suggest you look at it's documentation if it has anything that enables you to modify it's behavior in respect to input devices.

tim71
July 9th, 2007, 04:12 PM
If you have time, you could make a quick list of steps to go through in order to get lomoco working with the mice that need it. I could then add it to the troubleshooting section.
Quick list includes three steps:

1. get the lomoco package sudo apt-get install lomoco

2. issue following command in terminal sudo lomoco --no-sms

3. add following into /etc/rc.local before the line 'exit 0' lomoco --no-sms

visik7
July 9th, 2007, 04:18 PM
well right now I think I'll continue writing my bluetooth mouse driver that maps everythings from movements to buttons so I can handle they right.

daou
July 9th, 2007, 04:19 PM
Ok thanks, I'll make a link to that post.

Depressed Man
July 9th, 2007, 07:42 PM
Edit: nevermind found it was called metakey or something like that.

If I have the time I may dump my LX700 mouse. Though it looks like alot of work!

Perrako
July 10th, 2007, 12:54 AM
I'm running this on Sabayon, and lemme just say... Thank you. I've been trying for months to get this thing working in Sabayon but nothing worked (not even that symlinking thing someone posted a while ago back int he old mx thread) and this worked almost flawlessly. Great job, although I don't think btnx-config works just yet :P

Anyway, my question is this: I'm using an MX Revolution and I get two scroll events whenever I scroll my wheel, which can be a real pain, like rotating the desktop cube in beryl or scrolling through tabs. I tried using lomoco, but it apparently doesn't support my mouse. Is there anything else I can do?

Also, I'm trying to set the top wheel's left to right to alt-tab, but I instead get some sort of lame window switcher that behaves really funkily, like when I hold down control to do a control alt tab across all workspaces, it instead rotates the cube which I have bound to Ctrl-Alt-Left.

# Top wheel right.
# Does an Alt+Right. Ex. Firefox forward
Button
name = Top wheel right
rawcode = 0x02000600
type = 1
keycode = KEY_TAB
mod1 = KEY_LEFTALT
EndButton


# Top wheel left.
# Does an Alt+Left. Ex. Firefox back
Button
name = Top wheel left
rawcode = 0x020006FF
type = 1
keycode = KEY_TAB
mod1 = KEY_LEFTSHIFT
mod2 = KEY_LEFTALT
EndButton

glave
July 10th, 2007, 02:47 AM
I'm getting this familiar error:

glave@Centipede:~$ sudo /usr/sbin/btnx
Detected mouse: vxrevo Vendor=046d Product=c518
Device and event handler detection complete.
-Using event: event2
Error opening button event file descriptor"event2": No such file or directory


As in previous posts, my event2 is missing from /dev/input even though the others are present. This is on a laptop, I have tried other howtos before. I have went back and undid all my previous work at this, but this error is still persisting. I see in previous posts that removing the udev rules fixed this problem for those individuals, but doing so for myself has yielded no such luck.

My xorg.conf is currently:

Section "InputDevice"
# generated from default
Identifier "Configured Mouse"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
Option "Buttons" "3"
EndSection


Any direction?

visik7
July 10th, 2007, 04:21 AM
btnx crash when my mouse loose bt sync (batteries ran out)

SuperAndy
July 10th, 2007, 07:53 AM
can i just say, this works flawlessly with my mx revolution. brilliant!

Perrako
July 11th, 2007, 03:20 AM
Hey, just wanted to follow up with my previous issues.

1) I got btnx_config installed under sabayon, but I had to create a folder named /usr/share/icons/hicolor/72x72/apps, since it didn't exist by default and was stopping the installer.

2) I fiddled with btnx a lot more before installing btnx-3.0 to try and get the alt tabbing and stuff working, and it seems it behaves a little weirdly, like not letting me map ctrl alt click or ctrl alt u to my side buttons. I haven't had a chance to test this in btnx 3.0 because...

3) When I try and go through the detect buttons bit, it lets me detect a button and add it, but when I hit okay, the main window doesn't show back up. Btnx just closes. Am I doing this wrong or just crazy?

4) Also, I'm still getting two scroll wheel events, and lomoco doesn't recognize this mouse as being a valid logitech mouse.

Thanks,
perrako

daou
July 12th, 2007, 11:29 AM
Hey, just wanted to follow up with my previous issues.

1) I got btnx_config installed under sabayon, but I had to create a folder named /usr/share/icons/hicolor/72x72/apps, since it didn't exist by default and was stopping the installer.


I'll fix the install script in the next update to make sure all the directories exist.


2) I fiddled with btnx a lot more before installing btnx-3.0 to try and get the alt tabbing and stuff working, and it seems it behaves a little weirdly, like not letting me map ctrl alt click or ctrl alt u to my side buttons. I haven't had a chance to test this in btnx 3.0 because...

3) When I try and go through the detect buttons bit, it lets me detect a button and add it, but when I hit okay, the main window doesn't show back up. Btnx just closes. Am I doing this wrong or just crazy?
I'm not getting these problems. And there shouldn't be any reason for btnx-config to close after pressing "OK". Is btnx-config still running (try running "ps -e | grep btnx-config") after the window disappears?


4) Also, I'm still getting two scroll wheel events, and lomoco doesn't recognize this mouse as being a valid logitech mouse.
First of all, why are you trying to bind your scroll wheel to anything? Does it not work? btnx does not stop events that xserver already recognizes (scroll wheel). You should only use buttons that do nothing with btnx.

In btnx-0.2.x you should leave the wheel scroll fields commented. In btnx-0.3.x, just leave the "Enabled" unchecked.

Or are you getting the "multiple events detected" warning during button detection?


Thanks,
perrakoNo problem

Oh, and are you still having the problem with the beryl rotating on wheel tilt? There could be a couple of things at play. One, you might have accidentally scrolled the wheel when tilting it. I do this all the time on the MX Revo. Or, it could be that Beryl already binds the tilt to cube rotation. Then it's just a matter of correcting the Beryl setting. Again, btnx cannot stop another program from handling a mouse button event if they insist on doing it. The wheel tilts could be fixed with a simple xmodmap command, if Beryl is recognizing them.
Also, there is a problem with the wheel tilt handling, something that btnx cannot fix. I think this is what is causing your Alt-Tab to behave strangely. The tilts are relative events, not actual up and down button presses. This means, if you hold down the tilt, it will keep repeating the Alt-Tab. Your mouse is continuously sending these signals, and btnx kindly does what the mouse wants. So you should only bind one-shot commands to the tilts, like Alt-Left and Alt-Right to go forward and backward in Firefox etc. (not ones that you need to hold down the button for).

daou
July 12th, 2007, 11:32 AM
btnx crash when my mouse loose bt sync (batteries ran out)

This is something that should be fixed in the future. Not a top priority at the moment, however. btnx doesn't know if your mouse is unplugged, and tries to keep reading events from it. This causes it to crash. Also, there is no autostart when a detected mouse is plugged in. Another thing that should be done, sometime in the future.

daou
July 12th, 2007, 11:34 AM
I'm getting this familiar error:

glave@Centipede:~$ sudo /usr/sbin/btnx
Detected mouse: vxrevo Vendor=046d Product=c518
Device and event handler detection complete.
-Using event: event2
Error opening button event file descriptor"event2": No such file or directory
As in previous posts, my event2 is missing from /dev/input even though the others are present. This is on a laptop, I have tried other howtos before. I have went back and undid all my previous work at this, but this error is still persisting. I see in previous posts that removing the udev rules fixed this problem for those individuals, but doing so for myself has yielded no such luck.

My xorg.conf is currently:

Section "InputDevice"
# generated from default
Identifier "Configured Mouse"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
Option "Buttons" "3"
EndSection
Any direction?

Is this the reason why you said btnx-0.2.x doesn't work? Does btnx-0.3.x still work for you?

daou
July 12th, 2007, 11:35 AM
I fixed a bug in btnx-0.3. It wouldn't recognize MX Revolution's second input handler correctly. The fix will be in 0.3.1, which I will release later.

Perrako
July 12th, 2007, 03:25 PM
Ok, I tooled around in btnx-config to see if I could gain more understanding of why it's crashing. 90% of this is likely irrelevant, but I might as well post it anyway.

So, I tried running btnx-config from the command line to see it's output.
Warning: invalid button index reported by buttons_check_index.
No previous config file at /etc/btnx/btnx_config. No configuration loaded.
Warning: tree_buttons_empty_store could not get an iter.
Warning: tree_buttons_empty_store could not get an iter.
Aborted

The first three lines I got right as I opened btnx, and the last 2 I got right as I hit ok after detection. Also, after the window closes, btnx-config isn't running anymore.

Now if I run it with the default mxrev configuration file from /etc/btnx/defaults, I get this error:
Warning: invalid button index reported by buttons_check_index.
Warning: tree_buttons_empty_store could not get an iter.
Aborted

I tried also hitting cancel after the button detection to see if maybe that would fix some stuff. Well, it brought me back to the main screen, but that was about it. However, pressing "restart btnx" after pressing the cancel button gives me a different error, regarding to issues with /etc/init.d/btnx, which after make install-generic doesn't show up. If I do a plain ol' make install, I get errors in /etc/init.d/btnx saying "line 34: /lib/init/vars.sh: No such file or directory".

Finally, to top it all off, if I try to use btnx by itself without btnx-config, by copying the default mxrevo config over and running ./btnx, I get:

Opened handler: /dev/input/event0
Opened handler: /dev/input/event1
Opened handler: /dev/input/event2
Opened handler: /dev/input/event3
Opened handler: /dev/input/event4
Opened handler: /dev/input/event5
Opened handler: /dev/input/event6
Opened handler: /dev/input/event7
Opened handler: /dev/input/event8
Opened handler: /dev/input/event9
Opened handler: /dev/input/event10
Error opening button event file descriptor: No such file or directory


Also, to clarify on the scroll wheel thing; I wasn't binding it in btnx, however, scrolling it both before and after btnx sends two events to the computer, something I tried to rectify with lomoco --no-sms. However, lomoco doesn't seem to recognize my mouse. Any other suggestions?

Thanks for the lengthy response,
perrako

daou
July 12th, 2007, 04:04 PM
Ok, I tooled around in btnx-config to see if I could gain more understanding of why it's crashing. 90% of this is likely irrelevant, but I might as well post it anyway.

So, I tried running btnx-config from the command line to see it's output.
Warning: invalid button index reported by buttons_check_index.
No previous config file at /etc/btnx/btnx_config. No configuration loaded.
Warning: tree_buttons_empty_store could not get an iter.
Warning: tree_buttons_empty_store could not get an iter.
AbortedThe first three lines I got right as I opened btnx, and the last 2 I got right as I hit ok after detection. Also, after the window closes, btnx-config isn't running anymore.

Now if I run it with the default mxrev configuration file from /etc/btnx/defaults, I get this error:
Warning: invalid button index reported by buttons_check_index.
Warning: tree_buttons_empty_store could not get an iter.
AbortedI tried also hitting cancel after the button detection to see if maybe that would fix some stuff. Well, it brought me back to the main screen, but that was about it. However, pressing "restart btnx" after pressing the cancel button gives me a different error, regarding to issues with /etc/init.d/btnx, which after make install-generic doesn't show up. If I do a plain ol' make install, I get errors in /etc/init.d/btnx saying "line 34: /lib/init/vars.sh: No such file or directory".

Finally, to top it all off, if I try to use btnx by itself without btnx-config, by copying the default mxrevo config over and running ./btnx, I get:

Opened handler: /dev/input/event0
Opened handler: /dev/input/event1
Opened handler: /dev/input/event2
Opened handler: /dev/input/event3
Opened handler: /dev/input/event4
Opened handler: /dev/input/event5
Opened handler: /dev/input/event6
Opened handler: /dev/input/event7
Opened handler: /dev/input/event8
Opened handler: /dev/input/event9
Opened handler: /dev/input/event10
Error opening button event file descriptor: No such file or directoryAlso, to clarify on the scroll wheel thing; I wasn't binding it in btnx, however, scrolling it both before and after btnx sends two events to the computer, something I tried to rectify with lomoco --no-sms. However, lomoco doesn't seem to recognize my mouse. Any other suggestions?

Thanks for the lengthy response,
perrako

I'm not familiar with Sabayon, but hopefully it's not doing anything drastically different to cause these problems.

The default config files are leftovers from btnx-0.2.x and won't work with btnx-0.3.x. But you can make the old default MX Revo config file work, if you add this to the file:

Mouse
vendor_name = Logitech
product_name = MX Revolution
vendor_id = 0x046d
product_id = 0xc51a
EndMouseAnd if you are running btnx or btnx-config from command line, make sure you are root. Otherwise, opening the event handlers won't work.

The warning messages are nothing to be worried about. However, the abort message might indicate a seg fault of some kind. If you have gdb, you could try running it to get more detailed output:

(as root)
gdb btnx-config
#now you get a gdb prompt
runThen do whatever you did last time and see what kind of output the crash gives you.

The restart functionality probably only works on distros that use update-rc.d to make init scripts. Unless you've made a custom btnx init script for your distro that is located at /etc/init.d/btnx

Perrako
July 12th, 2007, 04:59 PM
Sabayon is gentoo based. Also, the error I got in gdb was:

Program received signal SIGSEGV, Segmentation fault.
0xb7e3c0de in ?? () from /usr/lib/libgtk-x11-2.0.so.0

daou
July 13th, 2007, 12:34 PM
Sabayon is gentoo based. Also, the error I got in gdb was:

Program received signal SIGSEGV, Segmentation fault.
0xb7e3c0de in ?? () from /usr/lib/libgtk-x11-2.0.so.0

It didn't give any more detailed output? What version of Gtk+ do you have? You need at least 2.10.11

You can check with the command "pkg-config --modversion gtk+-2.0"

Perrako
July 13th, 2007, 07:04 PM
You done gone fixed it :D

daou
July 14th, 2007, 08:49 AM
You done gone fixed it :D

Good to hear! :D

daou
July 14th, 2007, 08:53 AM
I'm working on the next update to btnx, version 0.3.1. A couple of improvements will be included, such as hotplugging. This has been requested by many people (especially laptop users).

And it looks like btnx-config + btnx-0.3.x is stable enough to release. btnx-0.2.14 will still be available, but won't be updated (unless there's a really good reason).

daou
July 14th, 2007, 11:53 AM
btnx-0.3.1 and btnx-config-0.1.6 can now be "tested". Make sure to update both programs!
They add hotplugging functionality and better support for other distros.

daou
July 14th, 2007, 05:09 PM
No one has mentioned problems with executing Firefox using btnx until now. The command line needs to be a little bit different for Firefox because of it's startup scripts.

I've added this to the FAQ section but here it is as well:

command = /bin/su -c firefox your_username
uid = 0Make sure UID is set to 0. But don't worry, Firefox won't run as root because su changes the user to whatever you set the your_username argument to.

EDIT: launching a web browser can also be done with KEY_WWW if you don't need to send any arguments to it.

shimoda
July 15th, 2007, 07:45 AM
thanks for develop btnx dao... :)

I want to test it, but not works for me :cry:

I have a Cordless Click Plus...

and with:
$ sudo /usr/sbin/btnx
I received:
Error: no supported mice detected.

In my xorg.conf:
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "auto"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "no"
Option "Buttons" "3"
EndSection

what could be wrong? :confused:

The Cordless Click Plus use the same receiver than a Cordless Keyboard... Is this important?
(newbie question? :P)

daou
July 15th, 2007, 08:20 AM
thanks for develop btnx dao... :)

I want to test it, but not works for me :cry:

I have a Cordless Click Plus...

and with:
$ sudo /usr/sbin/btnxI received:
Error: no supported mice detected.In my xorg.conf:
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "auto"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "no"
Option "Buttons" "3"
EndSectionwhat could be wrong? :confused:

The Cordless Click Plus use the same receiver than a Cordless Keyboard... Is this important?
(newbie question? :P)


Are you using btnx-0.2.x? If so, your Cordless Click Plus is probably using a different set of Vendor and Product IDs (possibly related to the shared receiver). btnx-0.3.x does the mouse detection differently. You could try using btnx-0.3.x and btnx-config and see if that works for you.

shimoda
July 15th, 2007, 08:56 AM
thanks for your fast reply! ;)

Yes, I'm using 0.2.14... I'll try 0.3 and I'll report results here...

daou
July 15th, 2007, 11:27 AM
btnx-config-0.1.7 fixes a hotplugging bug. I tested btnx-0.3.1 and btnx-config-0.1.6 on my Edgy laptop and the generated udev rule, that allows hotplugging, prevented the mouse driver from loading the MX Revo. One '+' sign missing ](*,).

shimoda
July 15th, 2007, 12:16 PM
daou, 0.3.1 works perfect for me :mrgreen:

fantastic work! It's a lot better than using xbindkeys...

The only thing that not worked was the Horizontal Scroll... I think it's because btnx not controls it... My settings are ignored... Horizonal Scroll always acts as Horizontal Scroll...

I will try to change something in xorg.conf...


thanks one more time!!! :)

daou
July 17th, 2007, 02:19 PM
daou, 0.3.1 works perfect for me :mrgreen:

fantastic work! It's a lot better than using xbindkeys...

The only thing that not worked was the Horizontal Scroll... I think it's because btnx not controls it... My settings are ignored... Horizonal Scroll always acts as Horizontal Scroll...

I will try to change something in xorg.conf...


thanks one more time!!! :)

No problem. Glad it's working.
Let me know if you can't solve the horiz. scroll problem.

daou
July 17th, 2007, 02:20 PM
A quick note to users who upgraded btnx-config from an earlier version to 0.1.7:

you must save the configuration file at least once (or click the Restart btnx button) for hotplugging to take effect, even if you don't need to make changes.

stryker719
July 18th, 2007, 02:48 AM
EDIT: Bah, sure enough, as soon as I posted I was able to figure out the right combination of keys to get the buttons to work.

Now, however, when I click the forward browse button on my MX Revolution it both moves a page forward AND opens up the right click context menu. How do I stop it from opening the menu?

kilroo
July 24th, 2007, 11:50 PM
trying to work with the latest version from the website with a Mediaplay. Everything works dandy except that as far as I can tell (both from btnx-config and from xev) the Media, Play, and Volume buttons aren't sending events at all and the next/previous track buttons are sending the same events as the front/rear thumb buttons. In case it helps:

cat /proc/bus/input/devices says:

I: Bus=0011 Vendor=0002 Product=0002 Version=000f
N: Name="PS2++ Logitech MX Mouse"
P: Phys=isa0060/serio1/input0
S: Sysfs=/class/input/input3
H: Handlers=mouse1 event3 ts1
B: EV=7
B: KEY=ff0000 0 0 0 0
B: REL=143


my xorg.conf says:

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "Device" "/dev/input/mice"
Option "Protocol" "auto"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "false"
Option "Buttons" "15"
EndSection


I -think- I have eliminated all traces of the methods I had tried before this. So far the one that has come the closest was using evdev, which I never finished trying to configure (although it was starting to look like it would be a major hassle to make the thumb buttons register properly as page up and page down using that method) but which, if I recall correctly, was reporting different events for every button under xev EXCEPT that the media and pause/play buttons were coming up the same.

EDIT 1--Correction: btnx seems to be registering left click, right click, middle click, wheel up/down, wheel tilt left/right...and then the media and play/pause buttons detect as the same, the thumb buttons detect as the same thing as the next/previous track buttons, and the volume buttons don't detect at all. Xev mostly seems to agree but registers nothing for the media and play/pause, and it's registering left tilt as the same button as volume down or the front thumb button.

I gather that 0.3.x doesn't use the default configs anymore...I was a little confused about that for a little bit. I went back and reread the first post and then skimmed (I think) the posts since the 0.3 release, but I didn't see anything that sounded like this problem. Any ideas? Should I be concerned by the fact that it appears not to think it's USB? Maybe tomorrow I'll try it without the little docking thing for the receiver.

EDIT 2--Solution: I had the receiver docking extension plugged into an adapter and from there into the PS/2 port. Apparently Windows could handle this (at least, I'm pretty sure it was working in Windows).

daou
July 25th, 2007, 10:42 AM
EDIT: Bah, sure enough, as soon as I posted I was able to figure out the right combination of keys to get the buttons to work.

Now, however, when I click the forward browse button on my MX Revolution it both moves a page forward AND opens up the right click context menu. How do I stop it from opening the menu?

Try editing your xorg.conf InputSection to look more like described here: http://ubuntuforums.org/showpost.php?p=2761505&postcount=54

daou
July 25th, 2007, 10:45 AM
trying to work with the latest version from the website with a Mediaplay. Everything works dandy except that as far as I can tell (both from btnx-config and from xev) the Media, Play, and Volume buttons aren't sending events at all and the next/previous track buttons are sending the same events as the front/rear thumb buttons. In case it helps:

cat /proc/bus/input/devices says:

I: Bus=0011 Vendor=0002 Product=0002 Version=000f
N: Name="PS2++ Logitech MX Mouse"
P: Phys=isa0060/serio1/input0
S: Sysfs=/class/input/input3
H: Handlers=mouse1 event3 ts1
B: EV=7
B: KEY=ff0000 0 0 0 0
B: REL=143


my xorg.conf says:

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "Device" "/dev/input/mice"
Option "Protocol" "auto"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "false"
Option "Buttons" "15"
EndSection


I -think- I have eliminated all traces of the methods I had tried before this. So far the one that has come the closest was using evdev, which I never finished trying to configure (although it was starting to look like it would be a major hassle to make the thumb buttons register properly as page up and page down using that method) but which, if I recall correctly, was reporting different events for every button under xev EXCEPT that the media and pause/play buttons were coming up the same.

Correction: btnx seems to be registering left click, right click, middle click, wheel up/down, wheel tilt left/right...and then the media and play/pause buttons detect as the same, the thumb buttons detect as the same thing as the next/previous track buttons, and the volume buttons don't detect at all. Xev mostly seems to agree but registers nothing for the media and play/pause, and it's registering left tilt as the same button as volume down or the front thumb button.

I gather that 0.3.x doesn't use the default configs anymore...I was a little confused about that for a little bit. I went back and reread the first post and then skimmed (I think) the posts since the 0.3 release, but I didn't see anything that sounded like this problem. Any ideas? Should I be concerned by the fact that it appears not to think it's USB? Maybe tomorrow I'll try it without the little docking thing for the receiver.

0.3.x doesn't use the default configs anymore. It's all handled by btnx-config now. Your mouse is recognized as a serial input device. This is a problem, someone else had it previously. Make sure you aren't using a USB->PS/2 adapter.

You could also try changing the Option "device" to use "/dev/psaux" instead of "/dev/input/mice".

blazoner
July 26th, 2007, 07:55 AM
You forgot to include tar -xvvf btnx-0.3.1.tar.gzin your install instructions. ;)Test btnx-config with btnx v. 0.3

Update: btnx-config-0.1.7 fixes a minor hotplugging bug.
Update: btnx-config-0.1.6 and btnx-0.3.1 add support for hotplugging. Also, MX Revo search button fixed, that was broken by btnx-0.3.0. A few other minor bugs fixed.

btnx with btnx-config should now work well enough.
btnx-config has some new functionality. A new combobox-entry is used for inputting keycodes. btnx-config ignores events from btnx, so it won't matter if btnx is running. The Restart btnx button saves your configuration and restarts btnx. This is useful for quickly testing the configuration.

The delay value is the amount of time that must pass between presses of a button. It's in milliseconds. If your button is very sensitive, you can give it a value of about 200-400 milliseconds. Or less, or more... what ever works for you.

Translations can be done via launchpad's rosetta soon. It's been over a week, the staff just needs to review it before they'll allow it to be submitted.

Installation
1. Make sure to uninstall your old btnx first!

2. Install btnx the usual way, making sure to get the new version. (users of other distros no longer need to use install-generic or uninstall-generic. Just use the normal ones.)

wget http://www.ollisalonen.com/btnx-0.3.1.tar.gz
cd btnx-0.3.1
make
sudo make install3. Get all the necessary dependencies. btnx-config needs libgtk2.0 and libgtk2.0-dev (version 2.10.11 or newer), libglade and libglade-dev (version 2.6.0 or newer), pkg-config (0.21 or newer), and build-essential. Tell me if you think I forgot something, ie. compiling failed.

sudo apt-get install build-essential libgtk2.0-0 libgtk2.0-dev libglade2-0 libglade2-dev pkg-config4. Get btnx-config, untar it, and make it.
wget http://www.ollisalonen.com/btnx-config-0.1.7.tar.gz
tar -xvvf btnx-config-0.1.7.tar.gz
cd btnx-config-0.1.7
make
sudo make installIf you encountered an error, there is probably a dependency problem.

5. You should have gotten a menu item (in GNOME, Applications->System tools->btnx). Press it to launch btnx-config.

daou
July 26th, 2007, 11:05 AM
You forgot to include tar -xvvf btnx-0.3.1.tar.gzin your install instructions. ;)

Thanks for pointing that out. Fixed.

blazoner
July 26th, 2007, 12:42 PM
It seems that btnx-config-0.1.7 doesn't like accepting both Ctrl+Tab and Ctrl+Shift+Tab in the same setup. It accepts Tab + Ctrl, but won't accept the Tab keycode again for the next shortcut. I know this is for keeping btnx from sending multiple events per keypress, but I was figuring that it should allow the same base keypress as long as it had different modifiers. I got around this by assigning Ctrl+Page Up instead of Ctrl+Shift+Tab, but figured I'd bring it to your attention.

And, I love the new stuff you've done. You ROCK! :guitar:

daou
July 28th, 2007, 06:29 AM
It seems that btnx-config-0.1.7 doesn't like accepting both Ctrl+Tab and Ctrl+Shift+Tab in the same setup. It accepts Tab + Ctrl, but won't accept the Tab keycode again for the next shortcut. I know this is for keeping btnx from sending multiple events per keypress, but I was figuring that it should allow the same base keypress as long as it had different modifiers. I got around this by assigning Ctrl+Page Up instead of Ctrl+Shift+Tab, but figured I'd bring it to your attention.

And, I love the new stuff you've done. You ROCK! :guitar:

Glad you like it the new stuff!

The problem you were having, I don't think it has anything to do with blocking multiple events. First, it only has an effect if you have used the delay field. Second, the multiple event detection is done according to rawcodes, not keycodes. So, you could configure all your buttons to send the same keycodes, and nothing would affect their events. Only if you press the same mouse button multiple times.

This could be a problem outside btnx. Or not.

daou
July 28th, 2007, 06:43 AM
I though I'd cut and paste a small excerpt from the new btnx manual, concerning possible future improvements to btnx. This manual will later be available at my website and will be bundled with btnx-config-0.2.0.

There are still many possible improvements for btnx. The only thing missing is time to implement them.
An excellent addition would be support for multiple configuration files. For example, a user could configure a certain keycombo to restart btnx with a different configuration file. Then, the user could make one configuration for Internet surfing, another for a certain game, one for coding, etc., and switch between them quickly.
Another improvement would be support for multiple input devices simultaneously. For example, I have a Logitech keyboard with many extra buttons that are not recognized and have no functionality. I can detect and configure them in btnx-config, but certain small changes in btnx are needed to be able to use the keyboard buttons. Then, I could configure a single configuration file to support both the keyboard and my mouse at the same time. This would need a lot of changes to btnx-config and btnx.
These improvements will be considered for btnx-0.4.x and btnx-config-0.3.x.Hopefully I'll have time to code these sometime. Lately, most of my time has gone to upgrading the btnx-config build process to use autotools. And writing documentation for btnx. After I release btnx-config-0.2.0, I'm taking a small break from btnx to work on another project that has been on the backburner for almost two months. Not to worry though, I'll still monitor this thread and respond to any questions/problems/comments.

yogo
July 29th, 2007, 02:45 AM
This was kinda fun and a good learning experience.


I got btnx installed and have the right config file for my Logitech cordless click plus mouse installed.

My mouse is functioning but not with the functions I want. The main function I want is the document flip or application switcher.

How do I go about editing these values so that my mouse behaves properly?


The side buttons are fine if they are set to go forward and backwards thru web pages. Right now the back button opens up a right click window and the application switch pastes.


TIA

yogo
July 29th, 2007, 12:01 PM
I am still having troubles with get my mouse button functions to work correctly in the Cordless Click Plus.

Here is what I have ....What should I change to get my application switcher working?

#----------------------------------------------------------
# Logitech Cordless Click Plus btnx configuration file
#----------------------------------------------------------
#
################################################## #########
# READ ME FIRST!!!!!!!!!!!!!!!!!!!
################################################## #########
# This file is used to configure btnx's behavior.
# Lines are commented with # characters.
#
# Basic structure of a button configuration for sending
# keyboard and button events
# -------------------------------------------------------
# Button
# rawcode = 0x00000000
# type = 0
# keycode = KEY
# mod1 = KEY
# mod2 = KEY
# mod3 = KEY
# EndButton
#
#
# Basic structure of a button configuration for command
# execution
# -------------------------------------------------------
# Button
# rawcode = 0x00000000
# type = 0
# command = /path/to/file_name arg1 arg2 ... argN
# uid = 1000
# EndButton
#
#
#
# Description of the structure
# -------------------------------------------------------
# The configuration field for a button must be started by
# a "Button" line and closed by an "EndButton" line. Inside
# the configuration you MUST specify:
# - rawcode
# - type
# - keycode OR command
#
# The mod[1..3] fields are optional. The fields have the
# following meanings:
#
# rawcode: the byte stream sent to an event handler by the
# mouse driver, used to identify the button. It must be a
# 32-bit base16 (hexadecimal) value preceded by "0x". You
# probably should not change this value at all.
#
# type: the type of event the button sends.
# (Preset for your specific mouse buttons.)
# If pressing the button sends a button press signal and
# releasing it sends a release signal, the type is 0.
# If pressing the button sends both press and release signals
# simultaneously, the type is 1.
# -This is usually necessary for mouse wheel events.
#
# keycode: this is the actual value of the key or button to
# send when the mouse button is pressed. Have a look at the
# events file (located at /etc/btnx/events) for all possible
# values. You can use any key (KEY_*) or button (BTN_*) events
# in that file. The events beginning with KEY_ are for simulating
# keyboard events and the events beginning with BTN_ are for
# simulating mouse button events. Not all of them are handled by
# X. You must use the string describing the event! Not the number.
# -Special note: REL_WHEELFORWARD and REL_WHEELBACK are for
# sending mouse wheel scroll events.
#
# mod[1..3]: these are modifier key values. Examples are
# shift (KEY_LEFTSHIFT, KEY_RIGHTSHIFT), ctrl (KEY_LEFTCTRL, ...),
# alt, etc. You can combine up to three modifier keys together with
# a keycode. You can even combine them with mouse button events.
# You do not need to specify any mod keys if you don't need to.
#
# command: this describes the command you want to execute when
# pressing a button. First, you must specify the location of
# the file (full path and name). You may then specify any program
# specific arguments. Example:
# command = /usr/bin/gedit --new-window /etc/btnx/btnx_config
# This will open gedit in a new window and open this configuration
# file.
#
# uid: this is the UID (User IDentifier) of the user that executes
# the command. You should probably execute commands with your UID.
# You can get your UID by typing:
# $ echo $UID
# in your terminal.
# ##############!!WARNING!!!###############
# If you do not specify a UID, btnx will execute
# the program with the same privileges as btnx (root, uid=0).
# Do this ONLY if you _must_ have root privileges to execute
# something. Use common sense. It's not too smart to have root
# privileges on your mouse button.
#
# Go ahead and specify a Button section for each one of your
# mouse buttons. Use the example configurations below as a
# reference.
#-----------------------------------------------------------



# These buttons are configured for the Cordless Click Plus mouse.
#-----------------------------------------------------------

# Do not change the vendor_name or product_name values
vendor_name = Logitech
product_name = Cordless Click Plus

# Left mouse button
# NOTE: This is commented out. You probably don't want
# to send extra events when pressing this button!
#Button
#name = Left button
#rawcode = 0x01011000
#type = 0
#keycode = KEY_UNKNOWN
#EndButton


# Right mouse button
# NOTE: This is commented out. You probably don't want
# to send extra events when pressing this button!
#Button
#name = Right button
#rawcode = 0x01011100
#type = 0
#keycode = KEY_UNKNOWN
#EndButton


# Mouse wheel press
# NOTE: This is commented out. You probably don't want
# to send extra events when pressing this button!
#Button
#name = Wheel press
#rawcode = 0x01011200
#type = 0
#keycode = KEY_UNKNOWN
#EndButton

yogo
July 29th, 2007, 07:40 PM
Sorry that my question was posted here, I did not realize it was just for tutorials and not questions.

daou
July 31st, 2007, 12:23 PM
Sorry that my question was posted here, I did not realize it was just for tutorials and not questions.

Don't worry. This thread is also for questions relating to btnx.

It seems that the config file you posted got cut short. So I can't see exactly what changes you have made.

If you are having trouble with the config file, you could try installing btnx-0.3.1 and btnx-config-0.1.7.
It will give a graphical configuration tool.

The application switcher is difficult to use with btnx, because it requires two keys that need to be pressed
separately. For example, you could make a button send an Alt+Tab combo, but that would switch only between the two most recent apps. This could be done by binding one button to Alt, holding it down, then binding another button to Tab and pressing that. But thats not practical.

Some desktop additions, like Beryl and Compiz, provide an "application switcher", which does work with binding a single button to btnx.

As a simple example, to get just the Alt+Tab behavior, you would need to edit the correct button to look like below (find the button with the correct "name". Maybe you were referring to the one called "Top window button").

Button
name = Top window button
rawcode = 0x01011500
type = 0
keycode = KEY_TAB
mod1 = KEY_LEFTALT
EndButtonOnly edit the "keycode" and "mod#" values.

If you are having trouble with extra events, try looking at the troubleshooting section's xorg.conf editing sections.

yogo
July 31st, 2007, 12:59 PM
deleted for accidental double post.

yogo
July 31st, 2007, 01:08 PM
Thanks Daou,

I installed the latest and I like the configuration tool, seems like that should be easy enough to figure out. Sounds like a pain with the application switcher but I may just go the Beryl route. I just used my mouse button that normally worked for page back and it pasted code here so I will look around the config and see if I can get a few basic functions working.

Thanks for your help.


PS with the config, can you point me to some basic instructions on configuration. I tried mouse detection and went to save the default setting and btnx crashed.

TIA

Patrick-Ruff
July 31st, 2007, 02:49 PM
how do I make the backwards and forwards buttons on my MX310 actually go backwards and forwards in folders and in mozilla firefox?


thanks

azel
August 2nd, 2007, 07:22 AM
is there a way to get the init.d script working with fedora? i tried to adapt it, but it can neither start/stop nor restart...

yogo
August 3rd, 2007, 12:41 AM
This is so frustrating I have spent over a week to try to get this mouse straightened. The gui is difficult to figure out for BTNX, at least it is for me.

I also tried to uninstall using the command on page one but I get this error.

Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

Any ideas? a suggestion from me would be to do either a few screen shots for how to configure BTNX or a few btnx.config files for people to copy to at least get forward and backward buttons going.

Thanks in advance.



I: Bus=0017 Vendor=0001 Product=0001 Version=0100
N: Name="Macintosh mouse button emulation"
P: Phys=
S: Sysfs=/class/input/input0
H: Handlers=mouse0 event0 ts0
B: EV=7
B: KEY=70000 0 0 0 0 0 0 0 0
B: REL=3

I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/class/input/input1
H: Handlers=kbd event1
B: EV=120013
B: KEY=1007 2002000 4380207a f840d001 feffffdf ffefffff ffffffff ffffffff
B: MSC=10
B: LED=7

I: Bus=0003 Vendor=046d Product=c50d Version=0110
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:1d.0-2/input0
S: Sysfs=/class/input/input2
H: Handlers=mouse1 event2 ts1
B: EV=20007
B: KEY=ffff0000 0 0 0 0 0 0 0 0
B: REL=103
B: LED=ff00

I: Bus=0010 Vendor=001f Product=0001 Version=0100
N: Name="PC Speaker"
P: Phys=isa0061/input0
S: Sysfs=/class/input/input3
H: Handlers=kbd event3
B: EV=40001
B: SND=6

I: Bus=0019 Vendor=0000 Product=0002 Version=0000
N: Name="Power Button (FF)"
P: Phys=ACPI_FPB/button/input0
S: Sysfs=/class/input/input6
H: Handlers=kbd event6
B: EV=3
B: KEY=100000 0 0 0

I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button (CM)"
P: Phys=PNP0C0C/button/input0
S: Sysfs=/class/input/input7
H: Handlers=kbd event7
B: EV=3
B: KEY=100000 0 0 0

yogo
August 3rd, 2007, 12:49 AM
My config file


# This is a btnx configuration file generated by btnx-config

Mouse
vendor_id = 0x046d
product_id = 0xc50d
EndMouse

Button
name = Wheel right
rawcode = 0x02000600
enabled = 1
type = 1
delay = 0
keycode = KEY_RIGHT
mod1 = KEY_LEFTALT
mod2 = NONE
mod3 = NONE
EndButton

Button
name = Wheel left
rawcode = 0x020006ff
enabled = 0
type = 0
delay = 0
keycode = KEY_LEFT
mod1 = KEY_LEFTALT
mod2 = NONE
mod3 = NONE
EndButton

Button
name = Back button
rawcode = 0x01011300
enabled = 1
type = 0
delay = 0
keycode = KEY_FN_F
mod1 = KEY_LEFTCTRL
mod2 = KEY_LEFTALT
mod3 = NONE
EndButton

Button
name = Forward button
rawcode = 0x01011400
enabled = 1
type = 0
delay = 0
command =
uid = 0
EndButton

Button
name = Top window button
rawcode = 0x01011500
enabled = 1
type = 0
delay = 0
keycode = BTN_LEFT
mod1 = KEY_LEFTALT
mod2 = NONE
mod3 = NONE
EndButton

Button
name = text
rawcode = 0x01011200
enabled = 0
type = 0
delay = 0
keycode = NONE
mod1 = NONE
mod2 = NONE
mod3 = NONE
EndButton

Ansible
August 3rd, 2007, 12:21 PM
I use a trackball, and on windows I'm used to mapping the F2 key to the trackball left click. Is there a way to do this with btnx? It looks like the btnx-config GUI only accepts mouse buttons, not keyboard keys. Would it be possible to manually create a new BUTTON entry, and use a rawcode for F2?

I manually added an entry to the btnx_config file, but it didn't work:

Button
name = F2
rawcode = 0x000001d3
enabled = 1
type = 0
delay = 0
keycode = BTN_LEFT
mod1 = NONE
mod2 = NONE
mod3 = NONE
EndButton

daou
August 6th, 2007, 11:50 AM
This is so frustrating I have spent over a week to try to get this mouse straightened. The gui is difficult to figure out for BTNX, at least it is for me.

I also tried to uninstall using the command on page one but I get this error.

Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

Any ideas? a suggestion from me would be to do either a few screen shots for how to configure BTNX or a few btnx.config files for people to copy to at least get forward and backward buttons going.

Thanks in advance.


Sorry for the delay in my response. I've been unavailable the past couple of days.

The crashing problem you had earlier might have been the result of a malformed btnx_config file (old one from 0.2.x). But it looks like your newest one is correct for btnx-0.3.x.

Did you run a "make uninstall" when you tried to uninstall? The error implies you were trying to use apt-get or dpkg to remove btnx.

I have been making a complete manual for btnx in the past couple of weeks. It's not done quite yet, and I'm really short on free time. I'll try to get it up as soon as possible, though.

Your newest btnx_config file looks fine. Just remember to check the "Enabled" box on all buttons that you want to send events with (Wheel left and the button named "text" is disabled in your config file).
Your "Forward button" is set to execute an empty command. Make sure you have selected the "Keyboard combination" for the event type of that button, if you want to send keyboard events with it.

daou
August 6th, 2007, 11:52 AM
how do I make the backwards and forwards buttons on my MX310 actually go backwards and forwards in folders and in mozilla firefox?


thanks

Use Alt+Right and Alt+Left keyboard combinations.

daou
August 6th, 2007, 11:53 AM
is there a way to get the init.d script working with fedora? i tried to adapt it, but it can neither start/stop nor restart...

Are you using btnx-0.2.x or 0.3.x?
For 0.2.x, you have to ask the Fedora people how it should be done.

For 0.3.x, it should work as long as you have the start-stop-daemon program. Everything else is done by udev (starting btnx on boot, hotplugging).

daou
August 6th, 2007, 12:25 PM
I use a trackball, and on windows I'm used to mapping the F2 key to the trackball left click. Is there a way to do this with btnx? It looks like the btnx-config GUI only accepts mouse buttons, not keyboard keys. Would it be possible to manually create a new BUTTON entry, and use a rawcode for F2?

I manually added an entry to the btnx_config file, but it didn't work:

Button
name = F2
rawcode = 0x000001d3
enabled = 1
type = 0
delay = 0
keycode = BTN_LEFT
mod1 = NONE
mod2 = NONE
mod3 = NONE
EndButton

Techically, the GUI should be able to detect any button, if the event handler for that button has been detected. The button probably uses a different event handler for the left click. MX Revolution does this as well for the search button. It's handled by btnx and works.
If the left click is registered with a different Vendor and Product ID than the mouse itself, then btnx cannot help with that button. It isn't something that would be impossible to implement. An improvement for a later version, perhaps.

Ansible
August 6th, 2007, 01:03 PM
The btnx gui detects all four of the buttons on the trackball just fine. I think the problem is I'm trying to do something the GUI isn't designed to support.

Just to make sure we're on the same page here - I don't want to map the mouse click to F2, I want to map F2 to the mouse click. That is, when F2 is pushed I'd like a mouse down event to be generated. That's because the trackball button makes my thumb tired; I'd rather use a keyboard key instead.

The btnx GUI appears to only accept buttons on the mouse. There doesn't seem to be a way to input keyboard keys. I put that F2 entry in to the config manually in the hopes that maybe its a feature that is there but not supported in the GUI... the rawcode is just the keycode for F2, maybe that is the wrong value.

If this is not possible in the current release, I might try my hand at adding key support to the btnx program - is there some reason that this might be impossible to implement? It seems like it might work ok, since btnx scans for both keyboard and mouse events now. thx!

daou
August 6th, 2007, 01:15 PM
The btnx gui detects all four of the buttons on the trackball just fine. I think the problem is I'm trying to do something the GUI isn't designed to support.

Just to make sure we're on the same page here - I don't want to map the mouse click to F2, I want to map F2 to the mouse click. That is, when F2 is pushed I'd like a mouse down event to be generated. That's because the trackball button makes my thumb tired; I'd rather use a keyboard key instead.

The btnx GUI appears to only accept buttons on the mouse. There doesn't seem to be a way to input keyboard keys. I put that F2 entry in to the config manually in the hopes that maybe its a feature that is there but not supported in the GUI... the rawcode is just the keycode for F2, maybe that is the wrong value.

If this is not possible in the current release, I might try my hand at adding key support to the btnx program - is there some reason that this might be impossible to implement? It seems like it might work ok, since btnx scans for both keyboard and mouse events now. thx!

I misunderstood your first post. Thanks for clarifying. At the moment, what you propose is not possible. It's something that I've been thinking about adding for a while now, but haven't had the time. Adding that functionality to btnx would require big changes, at least GUI wise.

The problem is, btnx will only scan for event handlers (keyboard or mouse) that have the same Vendor and Product IDs. Your mouse and keyboard probably have different ones. The detection process would have to be changed so multiple input devices can be detected. The button configuration window would have to be changed to support multiple input devices. The config files would have to be slightly changed to allow for multiple input devices. Finally, this would have to be incorporated into btnx itself (the easiest bit).

All the other functionality is present in btnx for this to be possible, however.

greppi
August 7th, 2007, 06:33 AM
first, thanks a lot ... it works brilliant on my MX 510 ^^ ...

but one worry is about my 2 buttons near wheel button, on MX 510 it's [+] and [-], and when I went applications->System tools->btnx and click on detect mouse & buttons, btnx hasn't recognized my 2 buttons ...
What's wrong ?

thx for help

daou
August 7th, 2007, 03:35 PM
first, thanks a lot ... it works brilliant on my MX 510 ^^ ...

but one worry is about my 2 buttons near wheel button, on MX 510 it's [+] and [-], and when I went applications->System tools->btnx and click on detect mouse & buttons, btnx hasn't recognized my 2 buttons ...
What's wrong ?

thx for help

Is the progress bar not changing when you press a button during button detection? Try pressing the button at least 15 times. It could be a problem with the button sending more than one different event during a click. If this is the case, you will then get a window that asks you to bind a detected rawcode to that button. Try one and see if it works.

If this didn't work, let me know and I'll try to give more help.

greppi
August 7th, 2007, 06:33 PM
Is the progress bar not changing when you press a button during button detection?
no it's not changing ... I tried press button 20 times, but "Detection progress" was still same ...

I fogot one thnig: buttons [+] and [-] works correctly (ubuntu recognize them) - this buttons increase or decrease mouse sensitivity - but I want to bind this buttons for other action (for expamle copy text, switch windows, and so on) and therefore I use btnx.

note: maybe, problem is in xorg.conf ... there is important text from file:
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "auto" #"ImPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "no"
Option "Buttons" "5"
EndSection

daou
August 9th, 2007, 03:55 PM
no it's not changing ... I tried press button 20 times, but "Detection progress" was still same ...

I fogot one thnig: buttons [+] and [-] works correctly (ubuntu recognize them) - this buttons increase or decrease mouse sensitivity - but I want to bind this buttons for other action (for expamle copy text, switch windows, and so on) and therefore I use btnx.

note: maybe, problem is in xorg.conf ... there is important text from file:
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "auto" #"ImPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "no"
Option "Buttons" "5"
EndSection

It's possible that they are associated with a different event handler than the mouse itself and the other buttons. Did you press the buttons during the mouse detection process?

You should try changing your xorg.conf InputSection "Device" to "/dev/psaux". It might help.

If the above doesn't work, then the problem is a bit more difficult. Try hexdumping those two buttons (see the first post in this thread for instructions, it's in the section marked "How to get support for mouse X?"). If you don't see any output when pressing the buttons, then btnx will not be able to use those buttons. If you do get output for those buttons, send me the hexdumps so I can try debugging the problem.

Ansible
August 10th, 2007, 11:08 AM
The problem is, btnx will only scan for event handlers (keyboard or mouse) that have the same Vendor and Product IDs. Your mouse and keyboard probably have different ones. The detection process would have to be changed so multiple input devices can be detected. The button configuration window would have to be changed to support multiple input devices. The config files would have to be slightly changed to allow for multiple input devices. Finally, this would have to be incorporated into btnx itself (the easiest bit).


Since I'm not actually doing any mouse mapping, I decided to give btnx a try using the keyboard as the single device. I was able to use the btnx_config GUI to determine the vendor and product ids, but it won't detect key presses as mouse buttons.

Right now my config file looks like this:


# This is a btnx configuration file generated by btnx-config

Mouse
vendor_id = 0x0001
product_id = 0x0001
EndMouse

Button
name = F2
rawcode = 0x0000ffbf
enabled = 1
type = 0
delay = 0
keycode = BTN_LEFT
mod1 = NONE
mod2 = NONE
mod3 = NONE
EndButton


The "Button" section I cut and pasted in myself. I wrote a wxWidgets program to capture the keyevent for F2 to determine the rawcode. I'm still not getting my left click, but maybe its close to working. Is there anything obviously wrong with this?

daou
August 10th, 2007, 11:49 AM
Since I'm not actually doing any mouse mapping, I decided to give btnx a try using the keyboard as the single device. I was able to use the btnx_config GUI to determine the vendor and product ids, but it won't detect key presses as mouse buttons.

Right now my config file looks like this:


# This is a btnx configuration file generated by btnx-config

Mouse
vendor_id = 0x0001
product_id = 0x0001
EndMouse

Button
name = F2
rawcode = 0x0000ffbf
enabled = 1
type = 0
delay = 0
keycode = BTN_LEFT
mod1 = NONE
mod2 = NONE
mod3 = NONE
EndButton
The "Button" section I cut and pasted in myself. I wrote a wxWidgets program to capture the keyevent for F2 to determine the rawcode. I'm still not getting my left click, but maybe its close to working. Is there anything obviously wrong with this?

If you are trying to send events with your keyboard, make sure the vendor_id and product_id are the same as your Vendor and Product ID report by "cat /proc/bus/input/devices" for your keyboard. Use the section marked "How to get support for mouse X?" in the first post of this thread to hexdump the event handler for your keyboard. Then you will find the correct rawcode. For F2, I get the following output:

000bd20 8804 46bc bcd9 000e 0001 003c 0000 0000
000bd30 8804 46bc bcdb 000e 0000 0000 0000 0000Yours is probably same. The rawcode is the bolded part (0x01003c00). Then, make the following changes to the btnx.c source file:

Change line 254 to (changing TYPE_MOUSE to TYPE_KBD):

fd_ev_btn = find_handler(O_RDONLY, device_get_vendor_id(), device_get_product_id(), TYPE_KBD);And comment, or delete line 261 (fd_ev_key = find_handler(O_RDONLY, device_get_vendor_id(), device_get_product_id(), TYPE_KBD); ).

Recompile btnx, then install it. Hopefully it will work (no guarantees, I haven't tried it). Tell me if it works, if not, I'll look more into it.

estaticd
August 11th, 2007, 06:19 AM
Is the MX400 not supported? I tried installing and everything works, but it is not detected. Let me know if you would need anything to get it supported.

Certainly not as popular as the other mice, but not nearly as uncomfortable for right-handers with large hands.

daou
August 11th, 2007, 07:10 AM
Is the MX400 not supported? I tried installing and everything works, but it is not detected. Let me know if you would need anything to get it supported.

Certainly not as popular as the other mice, but not nearly as uncomfortable for right-handers with large hands.

It's not explicitly supported. But some mice share a lot in common. A different shell on the same electronics.

But specific mouse support is no longer necessary with btnx-0.3.x. It should work with just about any mouse. And I'm no longer updating the 0.2.x branch of btnx that needs explicit support.

DarwinsTheory
August 11th, 2007, 11:43 PM
Hi,

Firstly gotta say sorry I'm a ubuntu newbie... been running Linux on servers for about 5 years but never actually used X or tried it as a desktop so struggling a little.

I've got a MX-1000 mouse and followed the instructions for the install and am not having much luck with the forward and backwards buttons working.

Details.

Vanilla install of Feisty with the exception that I've loaded the open source radeon drivers. Dual screen so no desktop stuff ie compiz or Beryl.

I have copied the default mx-1000 config over from the btnx-0.3.1/data/defaults directory but when I load btnx I get.

uinput modprobed successfully.
Opened handler: /dev/input/event0
Opened handler: /dev/input/event1
Opened handler: /dev/input/event2
Opened handler: /dev/input/event3
Opened handler: /dev/input/event6
Opened handler: /dev/input/event7
Error opening button event file descriptor: No such file or directory

So I load btnx-config and it appears the mouse has not been detected properly. Run through the Detect mouse & buttons. It wants to create new buttons... and then errors telling me that some are already defined.... Go through and define the ones that I could.. notice that some of the rawcode numbers are different to the config guide..

Still the thumb buttons forward and backwards don't work in firefox.


More info
Mouse is connected to the USB

My mouse config in the xorg.conf seems to be what's needed.
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "auto" #"ImPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "no"
Option "Buttons" "3"
EndSection


Would really appreciate any advice help etc.

Matt

daou
August 12th, 2007, 04:46 AM
Hi,

Firstly gotta say sorry I'm a ubuntu newbie... been running Linux on servers for about 5 years but never actually used X or tried it as a desktop so struggling a little.

I've got a MX-1000 mouse and followed the instructions for the install and am not having much luck with the forward and backwards buttons working.

Details.

Vanilla install of Feisty with the exception that I've loaded the open source radeon drivers. Dual screen so no desktop stuff ie compiz or Beryl.

I have copied the default mx-1000 config over from the btnx-0.3.1/data/defaults directory but when I load btnx I get.

uinput modprobed successfully.
Opened handler: /dev/input/event0
Opened handler: /dev/input/event1
Opened handler: /dev/input/event2
Opened handler: /dev/input/event3
Opened handler: /dev/input/event6
Opened handler: /dev/input/event7
Error opening button event file descriptor: No such file or directory

So I load btnx-config and it appears the mouse has not been detected properly. Run through the Detect mouse & buttons. It wants to create new buttons... and then errors telling me that some are already defined.... Go through and define the ones that I could.. notice that some of the rawcode numbers are different to the config guide..

Still the thumb buttons forward and backwards don't work in firefox.


More info
Mouse is connected to the USB

My mouse config in the xorg.conf seems to be what's needed.
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "auto" #"ImPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "no"
Option "Buttons" "3"
EndSection


Would really appreciate any advice help etc.

Matt

X and the desktop are just a subset of this OS. If you've used Linux from the command line, I'd say you know 90% of all that is needed. And the rest you'll catch on to in no time.

How does dual screen affect your ability to use Compiz/Beryl? Worked just fine on my dual screen setup (although with NVIDIA drivers). Not that it's necessary, I gave up on them almost a year ago and haven't missed the desktop effects.

Anyway, to the issue at hand. The howto is in a state of transition. Copying the defaults is no longer necessary with btnx-0.3.x and btnx-config. In fact, it will prevent them from working. Although your config file looks fine, I would suggest you delete it and redetect your mouse and buttons.

You mentioned that a couple of buttons don't work. Does this mean you got some buttons to work after using btnx-config? Or is btnx still exiting with the error "Error opening event file descriptor...."?

I haven't posted this anywhere else, but there is a manual for btnx at http://www.ollisalonen.com/btnx/man/
It has a troubleshooting section with a lot of tips.

DarwinsTheory
August 13th, 2007, 03:38 AM
Thanks daou,

I appreciate the encouragement... am going to hit the manual and have another go.

Oh and by the way after some more mucking around I got the forwards and backwards buttons working for firefox without btnx.

Of course now I want all the extra functionality that comes with btnx... lol

Changed my configured mouse to the following.

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "true"
Option "Buttons" "12"
Option "ButtonMapping" "1 2 3 6 7 8 9 10 11 12"
EndSection

Matt

daou
August 14th, 2007, 05:43 AM
There was a little mishap with the packaging of btnx-config-0.2.0.tar.gz. There were a couple of files missing. Fixed now.

greppi
August 15th, 2007, 12:53 AM
It's possible that they are associated with a different event handler than the mouse itself and the other buttons. Did you press the buttons during the mouse detection process?

You should try changing your xorg.conf InputSection "Device" to "/dev/psaux". It might help.

If the above doesn't work, then the problem is a bit more difficult. Try hexdumping those two buttons (see the first post in this thread for instructions, it's in the section marked "How to get support for mouse X?"). If you don't see any output when pressing the buttons, then btnx will not be able to use those buttons. If you do get output for those buttons, send me the hexdumps so I can try debugging the problem.

I follows "How to get support for mouse X?" and output of my /proc/bus/input/devices file is here:

I: Bus=0003 Vendor=046d Product=c01e Version=0110
N: Name="Logitech USB-PS/2 Optical Mouse"
P: Phys=usb-0000:00:10.1-1/input0
S: Sysfs=/class/input/input2
H: Handlers=mouse1 event2 ts1
B: EV=7
B: KEY=ff0000 0 0 0 0 0 0 0 0
B: REL=103

and in step 3 I did

cat /dev/input/event2

and when I move with my mouse, my screen looked like this http://img374.imageshack.us/img374/8544/konzolazz4.th.png (http://img374.imageshack.us/my.php?image=konzolazz4.png)
(no hexadecimal code) and even when I press [+] or [-] on my MX 518 no text showed, nothing happend. :(

daou
August 15th, 2007, 07:18 AM
cat /dev/input/event2and when I move with my mouse, my screen looked like this
(no hexadecimal code) and even when I press [+] or [-] on my MX 518 no text showed, nothing happend. :(

Try using the command hexdump instead:

sudo hexdump /dev/input/event2

inter4ever
August 18th, 2007, 10:49 AM
Hello,

I installed btnx and configured my MX Revolution, however, it had the problem of forward opening the context menu and moving forward too, so i read that someone had this problem in this thread and you guided him to fix it by having the same as your config. I did the same and now back and forward are working perfectly, however, my search button stopped working, I previously configured it to do ALT+F4(close) and it was working but after copying your settings in xorg.conf I lost this ability. Tried enabling and disabling it in btnx settings but with out any use. I also restarted X but still the same problem persists. Please guide me to the way to keep the my settings of forward and back and thumb wheel click= middle button, while restoring the search button close.

Best regards and thanks in advance.

Ansible
August 18th, 2007, 11:54 AM
daou:

I solved my problem with the F2! I traced the issue to this function:


int find_handler(int flags, int vendor, int product, int type)
{
int i, fd;
unsigned short id[6];
unsigned long bit[NBITS(EV_MAX)];
char name[16];

printf("input vendor: %d product: %d \n", vendor, product);
for (i=0; i<NUM_EVENT_HANDLERS; i++)
{
sprintf(name, "event%d", i);
if ((fd = open_handler(name, flags)) < 0)
continue;
ioctl(fd, EVIOCGID, id);
printf("vendor: %d product: %d \n", id[ID_VENDOR], id[ID_PRODUCT]);
if (vendor == id[ID_VENDOR] && product == id[ID_PRODUCT] &&
id[ID_BUS] == 0x0011) // Ansible's keyboard bus number
{
// Ansible added this.
return fd;

ioctl(fd, EVIOCGBIT(0, EV_MAX), bit);
if (((test_bit(EV_KEY, bit) && test_bit(EV_ABS, bit)) && type == TYPE_KBD))
{
return fd;
}
else if ((test_bit(EV_REL, bit)) && type == TYPE_MOUSE)
return fd;
printf("both tests failed\n");
}
close(fd);
}

printf("at return -1\n");
return -1;
}


It was never returning the fd because it always fell through to the "both tests failed" printf. I hardcoded the compare to have the bus id of my keyboard, 0x0011, and then return without doing the test_bit stuff. There is another device with the same product and vendor, the mac mouse emulation thing, so I had to add the bus compare.

Anyway, thanks for the help with this, supporting a feature that isn't really part of btnx yet. My thumb thanks you!

d.code
August 19th, 2007, 11:13 PM
I tried the svn version as of 19 Aug 2007 on Ubuntu Gutsy (AMD64), and it failed. I have a VX Revolution. When I ran btnx-config, it would only detect events for left button, right button, scroll wheel forward/back. It detected the forward thumb button as the same as button 1.

When I ran btnx in the foreground, I received the following output:


uinput modprobed successfully.
Opened handler: /dev/input/event0
Opened handler: /dev/input/event1
Opened handler: /dev/input/event2
Opened handler: /dev/input/event3
Opened handler: /dev/input/event4
Opened handler: /dev/input/event5
Opened handler: /dev/input/event6
Opened handler: /dev/input/event7
Opened handler: /dev/input/event8
Opened handler: /dev/input/event9
Opened handler: /dev/input/event10
Error opening button event file descriptor: No such file or directory


I did a make uninstall for both installs and installed the older version (0.2.14). I now get this output:

Detected mouse: vxrevo Vendor=046d Product=c518
Device and event handler detection complete.
-Using event: event2
Opened handler: /dev/input/event2
Opened handler: /dev/input/event3
Opened handler: /dev/input/uinput
Opened handler: /dev/input/uinput
No startup errors


Everything works as expected. I'm not sure what else I can do to help getting the new version working on my machine (thus making it more robust). I'm happy to help with getting this fixed if you give me some guidance.

Note that this looks to be a similar issue that DarwinsTheory was having, but I never saw a resolution for it.

greppi
August 20th, 2007, 04:24 PM
Try using the command hexdump instead:

sudo hexdump /dev/input/event2

I tried sudo hexdump /dev/input/event2, but when I moved with my mouse (and also pressed every button) nothing showed, but when I typed sudo hexdump /dev/input/event3, everything worked except my [+] and [-] buttons :( ... when I pressed [+] or [-] no hexadecimal code showed ... but when I pressed side buttons or scroll everything worked properly.

It's strange ... :shock:

daou
August 21st, 2007, 06:18 AM
Hello,

I installed btnx and configured my MX Revolution, however, it had the problem of forward opening the context menu and moving forward too, so i read that someone had this problem in this thread and you guided him to fix it by having the same as your config. I did the same and now back and forward are working perfectly, however, my search button stopped working, I previously configured it to do ALT+F4(close) and it was working but after copying your settings in xorg.conf I lost this ability. Tried enabling and disabling it in btnx settings but with out any use. I also restarted X but still the same problem persists. Please guide me to the way to keep the my settings of forward and back and thumb wheel click= middle button, while restoring the search button close.

Best regards and thanks in advance.

Try deleting the search button and redetecting it.

daou
August 21st, 2007, 06:20 AM
daou:

I solved my problem with the F2! I traced the issue to this function:

It was never returning the fd because it always fell through to the "both tests failed" printf. I hardcoded the compare to have the bus id of my keyboard, 0x0011, and then return without doing the test_bit stuff. There is another device with the same product and vendor, the mac mouse emulation thing, so I had to add the bus compare.

Anyway, thanks for the help with this, supporting a feature that isn't really part of btnx yet. My thumb thanks you!

No problem. Glad you got it working. Never hurts to know a little C ;).

daou
August 21st, 2007, 06:41 AM
I tried the svn version as of 19 Aug 2007 on Ubuntu Gutsy (AMD64), and it failed. I have a VX Revolution. When I ran btnx-config, it would only detect events for left button, right button, scroll wheel forward/back. It detected the forward thumb button as the same as button 1.

...
Everything works as expected. I'm not sure what else I can do to help getting the new version working on my machine (thus making it more robust). I'm happy to help with getting this fixed if you give me some guidance.

Note that this looks to be a similar issue that DarwinsTheory was having, but I never saw a resolution for it.

Could you send me your /proc/bus/input/devices output, especially the section with your mouse. And also your xorg.conf InputSection.

daou
August 21st, 2007, 06:45 AM
I tried sudo hexdump /dev/input/event2, but when I moved with my mouse (and also pressed every button) nothing showed, but when I typed sudo hexdump /dev/input/event3, everything worked except my [+] and [-] buttons :( ... when I pressed [+] or [-] no hexadecimal code showed ... but when I pressed side buttons or scroll everything worked properly.

It's strange ... :shock:

This means btnx cannot do anything with the buttons because they aren't sending any events. It could be a setting somewhere that we have overlooked... if you changed your xorg.conf InputSection like I recommended, then I'm a little bit at a loss as to what to try.

I'll keep this in mind and try to figure something out. But if you manage to fix it, tell me what you did.

d.code
August 21st, 2007, 11:52 PM
Here are the seemingly relevant portions of those 2 files. In addition to the input section I have for my mouse, I'm also using the wacom driver for my tablet screen. These aren't using evdev, though, so I don't see how it would interfere. The btnx devices are what I'm currently using with the older version. Also, I've re-inserted my USB receiver a couple times since firing up X. I guess that's why I'm using the larger Sysfs indices.


------------------------------------------
/proc/bus/input/devices
------------------------------------------
I: Bus=0003 Vendor=046d Product=c518 Version=0111
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:1a.7-4.3/input0
S: Sysfs=/class/input/input9
U: Uniq=
H: Handlers=mouse2 event9
B: EV=7
B: KEY=ffff0000 0 0 0 0
B: REL=143

I: Bus=0003 Vendor=046d Product=c518 Version=0111
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:1a.7-4.3/input1
S: Sysfs=/class/input/input10
U: Uniq=
H: Handlers=kbd event10
B: EV=f
B: KEY=7fff002c3027 bf00444000000000 1 f808837c000 667bfad9415fed 8e000000000000 0
B: REL=40
B: ABS=100000000

I: Bus=0000 Vendor=b216 Product=0002 Version=0000
N: Name="btnx keyboard"
P: Phys=
S: Sysfs=/class/input/input11
U: Uniq=
H: Handlers=kbd event11
B: EV=100003
B: KEY=7fffffffffffffff ffffffffffffffff ffffffff00000000 0 ffffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff

I: Bus=0000 Vendor=b216 Product=0001 Version=0000
N: Name="btnx mouse"
P: Phys=
S: Sysfs=/class/input/input12
U: Uniq=
H: Handlers=mouse3 event12
B: EV=7
B: KEY=ffffffff ffffffffffffffff 0 0 0 0
B: REL=103

------------------------------------------
xorg.conf (Relevant)
------------------------------------------
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/psaux"
Option "Protocol" "auto"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "2"
Option "Buttons" "3"
EndSection

fixx2000
August 24th, 2007, 08:43 AM
Is anyone having problems with downloading this file or opening the website?

Tim Perry
August 24th, 2007, 11:15 PM
Aye, seems to be down. Waiting in hope...

daou
August 25th, 2007, 05:47 AM
The site is back online. There was a lightning storm a couple of days ago which knocked out power. Forgot to boot up the server (an old IBM Thinkpad dusting in the corner).

daou
August 25th, 2007, 06:10 AM
Here are the seemingly relevant portions of those 2 files. In addition to the input section I have for my mouse, I'm also using the wacom driver for my tablet screen. These aren't using evdev, though, so I don't see how it would interfere. The btnx devices are what I'm currently using with the older version. Also, I've re-inserted my USB receiver a couple times since firing up X. I guess that's why I'm using the larger Sysfs indices.


The event handler detection changed in 0.3.0, and I believe this is what is causing the problem. It's done in a much better way (from a programmer's perspective) in 0.3.x. The method in 0.2.x worked, but its implementation looks like a desperate hack. It looks like there is a bug involved.

It probably has to do with the detection process trying to distinguish between mouse and keyboard handlers. This is done by observing return values from ioctl commands on the event handlers in the function find_handler() in btnx.c.

A mouse is detected if the ioctl command returns EV_REL bits (related to mouse motion and wheel scrolls). A keyboard is detected if EV_KEY (keys) and EV_ABS (absolute motion values) bits are detected. It looks like the mouse check fails for you. I'm not sure how to fix this at the moment. I'll have to look into it further.

po0f
August 26th, 2007, 09:02 PM
daou,

Great work here! I really appreciate you taking to time to create a tool like this for all to enjoy. I had previously used your other HOWTO to get my MX Revolution up and running and am actually glad that there is now a more generic solution. Thanks again!

phyrewall
August 27th, 2007, 03:58 AM
BTNX-config doesn't detect my USB G5, any ideas?

pavpan
August 28th, 2007, 08:23 PM
Hello, I just found btnx and I'm having a few problems (and don't have the patience to search through the thread for an answer; sorry if my problem has already been solved).

I just got an MX Revolution. I'm trying to use btnx to configure extra buttons.

Some of the default configuration options work: search key is an example. However, most of the rest does not. The thumb-back button sends Button2 (middle click) events, forward sends Button3 (right). The thumb wheel doesn't do anything. Neither does tilting.

:(

I'm wondering if I'm using the wrong protocol (ImPS/2) or maybe there is a different problem. In any case, thanks in advance, I'm sure you guys have a fix!:)

Edit: Now I cleared the config file and it wont detect my mouse at all! Except when I press the search key. But then its only detecting the search key...

jawn
August 29th, 2007, 12:10 AM
So I got btnx running on my new box here, and it's just great! I have pretty much everything working with my MX Revolution, except for one thing. When I click my middle mouse button, it changes the scroll type (clicky vs continuous). Can btnx change this behavior, or do I need something like locomo?

Thanks!

dtown240
August 29th, 2007, 04:00 AM
THANK YOU!!!!!!

This installation and program worked to do EXACTLY what I wanted it to, and was quite painless. Your efforts are VERY much appreciated.

visik7
August 29th, 2007, 07:32 AM
btnx-config doesn't work properly I got
Warning: no valid pipes from pid <some_number>

BLTicklemonster
September 1st, 2007, 10:35 PM
This was a total bust for me, and I'll tell you why.

I don't know keyalt_whatever from Adams' apple.


See where I'm going? Right. The nice GUI is useless to me.

Oh, I did scroll around and find one fine person who had the two things I want most out of a mouse, and that's internet forward and back. So I copied all the stuff he had posted, and ... nothing. yes, I saved each one as I did them, and enabled them before saving, but nothing happened. Restarted, the machine. Still nothing. Even though I never saw anywhere that "this here thing will make it start working".

Might I make a suggestion?

You know those nice drop down thingies where you set the button function? How about put "right click" "left click" "scroll up" "scroll down" "forward" "back", etc. please? Then say how to make it start working, all right there up front in black and white, please?

I've now decided, against my wishes, to go here, http://ubuntuforums.org/showthread.php?t=219894&highlight=logitech , and try to set my mouse up this way again. I never ever get it to work the first time. Ever. I had high hopes for btnx, but once again, I have run into a program that is made for people who know the ins and outs of Linux, not the people who just want an alternative to windows that "just works".

I do applaud you for making what appears to be a really great program, and am not knocking it, I'm just mad that it appears to be made for people with way more knowlege of the os that I have.

Perhaps just a simple page that breaks down all keyalt_whatevers into their "noob" (read that as "people who just want an alternative to windows that "just works"" ) form. Like just like them all side by side:

keyalt_left = page back

or whatever, then somewhere make it plain what one does to make btnx take effect.

That would be very useful.

Thank you, and wish me luck with that other means of accomplishing the same ends.

That's my two cents for the day, I hope it's useful.

dsptech
September 2nd, 2007, 06:53 PM
The site is back online. There was a lightning storm a couple of days ago which knocked out power. Forgot to boot up the server (an old IBM Thinkpad dusting in the corner).

Seems that it's down again.
Can you get her kick-started again?
Anyone have an alternative place to download from?

bimmerd00d
September 6th, 2007, 03:33 PM
Hello, I just found btnx and I'm having a few problems (and don't have the patience to search through the thread for an answer; sorry if my problem has already been solved).

I just got an MX Revolution. I'm trying to use btnx to configure extra buttons.

Some of the default configuration options work: search key is an example. However, most of the rest does not. The thumb-back button sends Button2 (middle click) events, forward sends Button3 (right). The thumb wheel doesn't do anything. Neither does tilting.

:(

I'm wondering if I'm using the wrong protocol (ImPS/2) or maybe there is a different problem. In any case, thanks in advance, I'm sure you guys have a fix!:)

Edit: Now I cleared the config file and it wont detect my mouse at all! Except when I press the search key. But then its only detecting the search key...

I've got the same problem, pasting my xorg.conf into here too. I've tried a few different Device Options with no success.


Section "InputDevice"
Identifier "MXRevo"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "auto"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "no"
Option "Buttons" "3"
EndSection



EDIT: Found the issue, it's b/c i'm on a laptop using the Synaptics driver for the touchpad/styk. Now just need to figure out how to have my MX Revo use another driver and section of xorg.conf. I'm on the search now, but if anyone wants to jump in here and help me before hand that would be GREAT :)

pavpan
September 6th, 2007, 05:18 PM
I've got the same problem, pasting my xorg.conf into here too. I've tried a few different Device Options with no success.


Section "InputDevice"
Identifier "MXRevo"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "auto"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "no"
Option "Buttons" "3"
EndSection



EDIT: Found the issue, it's b/c i'm on a laptop using the Synaptics driver for the touchpad/styk. Now just need to figure out how to have my MX Revo use another driver and section of xorg.conf. I'm on the search now, but if anyone wants to jump in here and help me before hand that would be GREAT :)

I fixed my problem, which is exactly yours (though I'm on adesktop) by:
clear btnx config file (there's a button on the bottom)
remove usb reciever thing
plug in it into another usb port
do "configure mouse/buttons"
get the mouse configuration (follow onscreen instructions)
make usre you press the search key and the other mouse buttons, and that at the end when you have to save mouse configuration, it says handlers: 2)
add actions to buttons as you want.

bimmerd00d
September 6th, 2007, 05:21 PM
I fixed my problem, which is exactly yours (though I'm on adesktop) by:
clear btnx config file (there's a button on the bottom)
remove usb reciever thing
plug in it into another usb port
do "configure mouse/buttons"
get the mouse configuration (follow onscreen instructions)
make usre you press the search key and the other mouse buttons, and that at the end when you have to save mouse configuration, it says handlers: 2)
add actions to buttons as you want.

Doesn't seen to work on mine. I believe it's an issue with the synaptics driver for my touchpad. I think the Logitech is trying to use the Synaptics driver instead of the builtin "mouse." I'm trying to figure out a way to have the MX talk to another driver in xorg.conf. I'm kind of n00bish, so this is proving to be difficult :lolflag:

tim71
September 10th, 2007, 07:01 PM
One thing keeps me wondering though - new release of xorg is out and it includes some changes in handling of an input devices and I am not sure if it will even have a xorg.conf file any more.

How can that affect the possibilities of developing and using btnx in the future? :confused:

Jorenko
September 13th, 2007, 06:20 PM
I had the right-and-middle-click-when-pressing-side-buttons problem too and found a workaround. It seems like what happened was my xorg.conf said I had a 3 button mouse. Now, when I pressed the thumb buttons, it detected that they were pressed, but it thought it didn't have any buttons above 3! So, it just mapped them to 2 and 3 instead. The solution was to change the line
Option "Buttons" "3"
to
Option "Buttons" "12"

Now, if I turn off btnx and look in xev, when pressing the buttons they come up as 8 and 9, which aren't mapped to anything in X by default. Turning btnx back on, they work perfectly!

Isthan
September 16th, 2007, 03:00 PM
I was wondering if anyone could help me configure btnx. I have it installed properly with version 0.3.1. I was able to have the program detect my buttons. With the Back button I am trying to use the BTN_BACK and Forward with BTN_FORWARD. I checked in the enabled and saved the configuration. Testing the forward/back buttons on a web browser doesnt give the intended result that I thought i'd configured. Instead it does what its default was ever since I plugged it in which seems to be a right click or some sort of menu.

Any thoughts?

outphase
September 26th, 2007, 11:06 AM
So I got btnx running on my new box here, and it's just great! I have pretty much everything working with my MX Revolution, except for one thing. When I click my middle mouse button, it changes the scroll type (clicky vs continuous). Can btnx change this behavior, or do I need something like locomo?

Thanks!

I'm fairly certain that is a physical switch. I don't think there's a real middle click on the mouse. I end up using the Search button.

silentstorm
September 26th, 2007, 02:33 PM
I'm fairly certain that is a physical switch. I don't think there's a real middle click on the mouse. I end up using the Search button.

It's indeed a physical switch I ended up using the second scroll button

jamesford
September 27th, 2007, 12:45 PM
oh man,lol. i just got the mx revolution and tried btnx. its promising but all kinds of weird things are happening.

firstly a movie ive got on my desktop keeps getting copied so i always ahve 2 copies on the desktop. i dont know what buttons i may have clicked. pcm audio volume keeps going lower and lower, after a few hours its so low i cant hear music and have to reset it in alsamixer. whenever i use the back or forward buttons inside firefox gwget opens and downloads every item on the page im on.
random dirs in my homedir are turned into symlink pointing to themselves kinda.
i guess i gotta fiddle a bit more, lol.
and i should probably read this entire thread

im using feisty64, with compiz-fusion btw

edit: i think most things are ok now, its just the back and forward buttons sending additional commands it seems

BLTicklemonster
September 29th, 2007, 02:09 AM
Dang. Now that I know this:
# Thumb wheel forward.
# Does an Alt+Left. Ex. Firefox forward
Button
rawcode = 0x01011800
type = 1
keycode = KEY_LEFT
mod1 = KEY_LEFTALT
EndButton


# Thumb wheel back.
# Does an Alt+Right. Ex. Firefox back
Button
rawcode = 0x01011A00
type = 1
keycode = KEY_RIGHT
mod1 = KEY_LEFTALT
EndButton

I run btnx, and do the mouse detection, and I never get the forward button to work once I've sat still for 5 seconds, then pressed all the buttons, then clicked the button on the top.


*edit:

muahahahaha.

Turned off compiz desktop effects stuff, and tried it again. It works.

Thanks!

*edit:
Oops, when I hit forward, I not only go forward one page, but I also get a minimize, etc. window popping up, too.

What could be causing that, I wonder? I can live with it for now, I guess.

bimmerd00d
October 2nd, 2007, 11:42 AM
I must be doing something wrong, Btnx works GREAT with my MX Revolution....however i have to go tell it to restart btnx everytime i login. What gives?

nrwilk
October 8th, 2007, 12:05 AM
Heya everyone.

I'm looking at getting a new mouse, and was recommended the MX Revolution.

I just wanted to ask whether btnx works consistently and well enough with them for me to justify getting an MX Revolution. Does it?

I don't need ALL the buttons to work. I'm mostly looking for a comfortable feel and a FAST, precise scrollwheel. Other buttons are pretty much bonuses. Also, I'd like the side scroll wheel to work as well because if it didn't, that'd just be a waste.

Thank you!

BLTicklemonster
October 8th, 2007, 12:21 AM
Hot diggity dog! My forward and back buttons work in xp when I run it in VMWare now.

(okay, was it btnx, or service pack 2 that I installed the minute I booted to xp?)

RVDowning
October 8th, 2007, 10:14 PM
I am getting the following error when I attempt ./configure:

checking pkg-config is at least version 0.9.0... yes
checking for GTK... configure: error: Package requirements (gtk+-2.0 >=
2.10.11) were not met:

No package 'gtk+-2.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GTK_CFLAGS
and GTK_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

"pkg-config --modversion gtk+-2.0"


I do have gtk+2.0 (2.12.0-7) installed. The issue seems to be that the config file is looking for a gtk+-2.0, namely with a hyphen in the name. I have none of those environment variables set (would have no idea what to set them to).

I should note that I'm on Mandriva 2008.0

Any ideas?

techstop
October 10th, 2007, 05:52 AM
Thanks for the nice software! I almost have it working perfectly with my Logitech VX Revolution. However two issues;

1. How do I start btnx automatically? I need to run "sudo btnx" from a terminal to get it to run now.
2. Forward and back works fine in Firefox, and back works fine in Nautilus, but forward activates the right-click menu in Nautilus but doesn't go forward.

Any tips on fixing these two things? Cheers...

EDIT: forget about problem 1, it seems to have fixed itself...

Here is my xorg.conf for reference;

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "no"
Option "Buttons" "12"
EndSection

I have tried using 3, 5 and 12 for the buttons option... :(

daou
October 11th, 2007, 06:32 AM
Hi everyone,

I haven't been very active with btnx lately (ok I haven't even looked at it for 2 months). I blame the community. No one bothered to get me one of these coaches: http://xkcd.com/306/ ;).

I'll reply to the latest posts on this thread once I get myself orientated with btnx again.

Glad to see there haven't been too many problems with the newest release of btnx.

RVDowning
October 11th, 2007, 10:17 AM
You mean you've been letting a real life get in the way of your btnx work? :confused:

daou
October 12th, 2007, 06:57 AM
You mean you've been letting a real life get in the way of your btnx work? :confused:Yes, I have. How careless of me :P .

I am getting the following error when I attempt ./configure:

No package 'gtk+-2.0' found

I do have gtk+2.0 (2.12.0-7) installed. The issue seems to be that the config file is looking for a gtk+-2.0, namely with a hyphen in the name. I have none of those environment variables set (would have no idea what to set them to).There could be two problems. Either you don't have the necessary GTK+ source package installed on your distro, or the location of the library has not been registered with pkg-config correctly.

First, make sure the library isn't registered with a different name, like without the hyphen.

pkg-config --list-all | grep gtkIf it is named something other than gtk+-2.0, then edit the configure.ac file in the top source directory of btnx-config.

Replace the line

PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.10.11)with
PKG_CHECK_MODULES(GTK, package_name >= 2.10.11)or remove the whole line.
EDIT: removing will just delay the problem, pkg-config will not be able to give the correct CFLAGS etc. when compiling btnx-config. And changing the package name might not work unless you also edit the Makefile.am files, changing the gtk package name there as well. Try the last step instead (checking that the gtk dev files, headers etc, have been installed correctly). But tell me if the package name is different (or has changed in v. 2.12)

Then, hoping you have autotools, autoconf, and automake, you could run the following commands in the top source directory::


aclocal
autoconf
autoheader
automake --add-missing
./configureIf this works, I will add another check to the configure.ac to take care of it.

If the above wasn't the case, then see if there is anything in your distro's repository that refers to libgtk2.0 sources. On Ubuntu the debian package is libgtk2.0-dev, and installing it automatically registers the package with pkg-config.

If it doesn't register it automatically with pkg-config, then its a more difficult problem.

daou
October 12th, 2007, 07:02 AM
I was wondering if anyone could help me configure btnx. I have it installed properly with version 0.3.1. I was able to have the program detect my buttons. With the Back button I am trying to use the BTN_BACK and Forward with BTN_FORWARD. I checked in the enabled and saved the configuration. Testing the forward/back buttons on a web browser doesnt give the intended result that I thought i'd configured. Instead it does what its default was ever since I plugged it in which seems to be a right click or some sort of menu.

Any thoughts?

Window managers/applications don't seem to respect the intended functionality of those buttons always. I found that using Alt+Left or Right (KEY_LEFT and KEY_RIGHT) works better in Firefox and Nautilus when you want back and forward functionality.

daou
October 12th, 2007, 07:05 AM
It's indeed a physical switch I ended up using the second scroll button

It is a physical switch by default because it needs special USB commands which are not handled by the Linux kernel's input interface. I believe you can get some more functionality out of that button with revoco. (never used it). I use the search button as a middle click.

daou
October 12th, 2007, 07:16 AM
Heya everyone.

I'm looking at getting a new mouse, and was recommended the MX Revolution.

I just wanted to ask whether btnx works consistently and well enough with them for me to justify getting an MX Revolution. Does it?

I don't need ALL the buttons to work. I'm mostly looking for a comfortable feel and a FAST, precise scrollwheel. Other buttons are pretty much bonuses. Also, I'd like the side scroll wheel to work as well because if it didn't, that'd just be a waste.

Thank you!

btnx first started as a program for MX Revolution only and has been designed with that in mind. I can certainly recommend the mouse. As for the software, you'll need to get an answer from someone other than the developer, biased as I am ;). That said, it works well for me and my MX Revolution. btnx should work well on Feisty.

bimmerd00d
October 12th, 2007, 09:36 AM
Just wanted to add that btnx works like a charm on Gutsy 32-bit, about to try 64-bit.

daou
October 12th, 2007, 09:45 AM
Just wanted to add that btnx works like a charm on Gutsy 32-bit, about to try 64-bit.

Good to hear! Might slap it on my laptop in a few days when it is officially released.

daou
October 12th, 2007, 09:49 AM
Thanks for the nice software! I almost have it working perfectly with my Logitech VX Revolution. However two issues;

2. Forward and back works fine in Firefox, and back works fine in Nautilus, but forward activates the right-click menu in Nautilus but doesn't go forward.


Are you using the Alt+Left and Alt+Right for back and forward? KEY_LEFTALT+KEY_RIGHT, KEY_LEFTALT+KEY_LEFT

RVDowning
October 12th, 2007, 10:49 AM
Sorry for the confusion, I was just being stupid. :oops: I didn't have the source installed. Sigh..... Am now in the process of detecting, etc. Thanks much.

Rich

daou
October 12th, 2007, 11:02 AM
Sorry for the confusion, I was just being stupid. :oops: I didn't have the source installed. Sigh..... Am now in the process of detecting, etc. Thanks much.

Rich

No problem, happens to us all. Tell me if it works in Mandriva 2008 without any additional hacks.

RVDowning
October 12th, 2007, 02:59 PM
When attempting to start the btnx service I get the error message, "/etc/init.d/btnx: line 34: /lib/init/vars.sh: No such file or directory"

Any ideas?

Rich

RVDowning
October 12th, 2007, 03:29 PM
Commenting out line 34 (reference to vars.sh) which then caused the following errors:

/etc/init.d/btnx: line 130: log_daemon_msg: command not found
/etc/init.d/btnx: line 70: start-stop_daemon: command not found
/etc/init.d/btnx: line 79: start-stop_daemon: command not found
/etc/init.d/btnx: line 143: log_end_msg: command not found

I tried commenting these out, which then caused more errors, and I ended up getting myself hopelessly hosed. Not sure anymore what to comment out and what not to.

Jorenko
October 13th, 2007, 10:33 AM
Ever since updating to Gutsy, my thumb buttons are being buttons 2 and 3 for X again. Here's my xorg.conf mouse section:


Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "False"
Option "Buttons" "12"
EndSection


Any ideas, guys?

daou
October 14th, 2007, 08:33 AM
Ever since updating to Gutsy, my thumb buttons are being buttons 2 and 3 for X again. Here's my xorg.conf mouse section:


Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "False"
Option "Buttons" "12"
EndSection
Any ideas, guys?

Try changing the button number mapping with xmodmap as described in the btnx manual (http://www.ollisalonen.com/btnx/man/btnx-manual.html#AEN642) (troubleshooting section 9.2.3).

daou
October 14th, 2007, 08:36 AM
Commenting out line 34 (reference to vars.sh) which then caused the following errors:

/etc/init.d/btnx: line 130: log_daemon_msg: command not found
/etc/init.d/btnx: line 70: start-stop_daemon: command not found
/etc/init.d/btnx: line 79: start-stop_daemon: command not found
/etc/init.d/btnx: line 143: log_end_msg: command not found

I tried commenting these out, which then caused more errors, and I ended up getting myself hopelessly hosed. Not sure anymore what to comment out and what not to.

The service script in /etc/init.d/btnx is made from a Debian skeleton script. It apparently makes calls that are Debian (or Debian-based distros, ie Ubuntu) specific.

I will have to change this to make it compatible with other distros. Mandriva has start-stop-daemon, right?

daou
October 14th, 2007, 11:08 AM
A user made the suggestion to me over email to integrate revoco into btnx. A great idea, and I started to work on it. This will allow MX Revolution users to configure revoco in btnx-config.

I'm waiting for a reply from the author of revoco in order to clear up any questions regarding copyrights and distribution. Let's hope he appreciates the idea.

EDIT: for those who are not familiar with revoco, it is a program that allows MX Revolution users to change the behavior of the mouse wheel. You can make the wheel permanently free-scrolling or click-to-click. This allows for the use of the wheel-press, which can then be used in btnx as a different button. There is some other functionality as well.

yg17
October 14th, 2007, 03:38 PM
Try changing the button number mapping with xmodmap as described in the btnx manual (http://www.ollisalonen.com/btnx/man/btnx-manual.html#AEN642) (troubleshooting section 9.2.3).

I'm having the same problem with my MX Revo's thumb buttons. I tried the xmodmap thing, but then I lose right click functionality alltogether if I remap button 3 to something else. Here's whats in my xorg.conf

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "no"
Option "Buttons" "12"
EndSection

daou
October 14th, 2007, 03:45 PM
I'm having the same problem with my MX Revo's thumb buttons. I tried the xmodmap thing, but then I lose right click functionality alltogether if I remap button 3 to something else. Here's whats in my xorg.conf

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "no"
Option "Buttons" "12"
EndSection

Are you also on Gutsy? Try changing your InputDevice options like described in the manual's troubleshooting section 9.2.1. It might or might not work.

yg17
October 14th, 2007, 03:49 PM
Are you also on Gutsy? Try changing your InputDevice options like described in the manual's troubleshooting section 9.2.1. It might or might not work.

Sorry, yes, I'm on Gutsy

yg17
October 14th, 2007, 03:59 PM
OK, I think I got it working. I changed the device and protocol to what was in the manual and it looks like it works.

One more quick question, and I'm not sure if this is related to btnx, but can I change how many lines one click of the scroll wheel scrolls? Right now, it's moving too slow for my tastes (I think in OSX, I have it configured for 10 lines or something). Thanks

daou
October 14th, 2007, 04:08 PM
OK, I think I got it working. I changed the device and protocol to what was in the manual and it looks like it works.

One more quick question, and I'm not sure if this is related to btnx, but can I change how many lines one click of the scroll wheel scrolls? Right now, it's moving too slow for my tastes (I think in OSX, I have it configured for 10 lines or something). Thanks

I don't know if it's possible to do this in the window managers separately. You could probably double the speed with btnx by detecting the mouse wheel up and down scrolls. Then tell btnx to send the keycodes REL_WHEELFORWARD and REL_WHEELBACK for the scrolls.

daou
October 15th, 2007, 10:27 AM
New btnx-0.3.2 and btnx-config-0.2.1 integrate revoco. You will find a new tab at the top of btnx-config which opens the settings window. MX Revolution users will find this handy (especially if you want to use the mouse wheel-press as a button).

The online documentation does not include help for the revoco settings. However, the manual available from the Help button in btnx-config has an up to date manual that describes the settings. Its in the section marked "Configuring revoco".

Enjoy!

Depressed Man
October 15th, 2007, 11:09 AM
Trying to get it working in Gutsy..

vforviktor@vendetta-laptop:~/Installs/btnx-config-0.2.1$ ./configure
configure: error: cannot find install-sh or install.sh in config "."/config
vforviktor@vendetta-laptop:~/Installs/btnx-config-0.2.1$ '/home/vforviktor/Installs/btnx-config-0.2.1/configure'
configure: error: cannot find install-sh or install.sh in config "."/config
vforviktor@vendetta-laptop:~/Installs/btnx-config-0.2.1$

daou
October 15th, 2007, 11:18 AM
Trying to get it working in Gutsy..

vforviktor@vendetta-laptop:~/Installs/btnx-config-0.2.1$ ./configure
configure: error: cannot find install-sh or install.sh in config "."/config
vforviktor@vendetta-laptop:~/Installs/btnx-config-0.2.1$ '/home/vforviktor/Installs/btnx-config-0.2.1/configure'
configure: error: cannot find install-sh or install.sh in config "."/config
vforviktor@vendetta-laptop:~/Installs/btnx-config-0.2.1$


Ok same problem i forgot to fix when first released 0.2.0... couple files were links which needed to be replaced... download it again, should be fixed.

Depressed Man
October 15th, 2007, 01:55 PM
Thanks it works now (great in Gutsy!). Though I have a VX Revolution. Same as an MX but the laptop version (so it's smaller lol).

Jorenko
October 15th, 2007, 11:47 PM
Try changing the button number mapping with xmodmap as described in the btnx manual (http://www.ollisalonen.com/btnx/man/btnx-manual.html#AEN642) (troubleshooting section 9.2.3).

Well, this makes the thumb buttons send whatever other codes I map to 2 and 3, but it makes the actual right and middle click buttons send them as well, meaning I can no longer right or middle click at all.

Edit: I actually read the rest of the replies, and after changing the Device and Protocol lines it now works for me as well. Thanks, all!


Further Edit: One more bug report. When enabling the new revoco functionality (which is awesome, by the way), it appears that automatic mode goes away if I take the mouse out of range of the receiver. I need to restart btnx to get it back.

daou
October 16th, 2007, 10:19 AM
Well, this makes the thumb buttons send whatever other codes I map to 2 and 3, but it makes the actual right and middle click buttons send them as well, meaning I can no longer right or middle click at all.

Edit: I actually read the rest of the replies, and after changing the Device and Protocol lines it now works for me as well. Thanks, all!


Further Edit: One more bug report. When enabling the new revoco functionality (which is awesome, by the way), it appears that automatic mode goes away if I take the mouse out of range of the receiver. I need to restart btnx to get it back.

btnx only makes temporary changes to the wheel of the MX Revolution, which are reverted during boot (and apparently when the mouse is out of range). It's a matter of changing one byte to make the changes persist, but I was reluctant to do this in case it causes problems for users.

I will think about changing the setting in the next release.

daou
October 16th, 2007, 11:46 AM
When attempting to start the btnx service I get the error message, "/etc/init.d/btnx: line 34: /lib/init/vars.sh: No such file or directory"

Any ideas?

Rich

I attached a start up script with a lot of extra stuff commented out (including a lot of the logging features).

Try it by copying the file in the archive into /etc/init.d/btnx (replacing the old script). Then, make sure it is executable with chmod.

Then you can test it with /etc/init.d/btnx start | stop | restart

Tell me what happens.

RVDowning
October 16th, 2007, 09:29 PM
I attached a start up script with a lot of extra stuff commented out (including a lot of the logging features).

Try it by copying the file in the archive into /etc/init.d/btnx (replacing the old script). Then, make sure it is executable with chmod.

Then you can test it with /etc/init.d/btnx start | stop | restart

If I attempt to start it using Mandriva Control Center I get:
/etc/init.d/btnx: line 70: start-stop-daemon: command not found
/etc/init.d/btnx: line 79: start-stop-daemon: command not found

If instead, I type: /etc/init.d/btnx start
I get:
/etc/init.d/btnx: line 50: start-stop-daemon: command not found

Following is a thread from the MandruvaUsers.org newsgroup about a start-stop daemon:
http://mandrivausers.org/index.php?showtopic=43775&hl=

daou
October 18th, 2007, 02:24 AM
If I attempt to start it using Mandriva Control Center I get:
/etc/init.d/btnx: line 70: start-stop-daemon: command not found
/etc/init.d/btnx: line 79: start-stop-daemon: command not found

If instead, I type: /etc/init.d/btnx start
I get:
/etc/init.d/btnx: line 50: start-stop-daemon: command not found

Following is a thread from the MandruvaUsers.org newsgroup about a start-stop daemon:
http://mandrivausers.org/index.php?showtopic=43775&hl=

Ok thanks. I'm reading the Linux Standard Base Core Spec (LSB) now. Hopefully that will give some indication as to what needs to be done.

daou
October 18th, 2007, 05:48 AM
btnx v.0.3.3 has been released. Mostly bug fixes:
LSB compliant init scripts. No more explicit start-stop-daemon calls. (should now work for Mandriva). Thanks to RVDowning for helping find the solution (and spotting the problem ;) ).
Independent PID file creation and daemon backgrounds itself, like all good daemons should.btw, RVDowning, if it still doesn't work, send me Mandriva's /lib/lsb/init-functions file.

RVDowning
October 18th, 2007, 08:26 AM
I'm anxious to try it out. It will have to wait until I get home from work, but will report back as soon as I can. Thanks much! :)

RVDowning
October 18th, 2007, 12:49 PM
btw, RVDowning, if it still doesn't work, send me Mandriva's /lib/lsb/init-functions file.

Well, it was a no go. :( The system hangs at boot with a "starting udev" To bypass that point I key a CTRL Z. The bring up process then continues, sometimes with a mouse, sometimes without. I don't know whether the "starting udev" would have eventually timed out or not. I did wait 5 minutes, which I thought would have been enough time.

Was I supposed to have deinstalled the previous btnx before I installed v.0.3.3? Is there a way for me to deinstall the current v.0.3.3, or should I restore my system from backup? (Luckily I took one this morning.) I was home for lunch, so didn't have time to do more. I can get you the init-functions file after work. I may have to restore first, though.

daou
October 18th, 2007, 01:10 PM
Just remove the file /etc/udev/rules.d/99-btnx.rules
You shouldn't need to uninstall the old one first...

daou
October 18th, 2007, 01:16 PM
I just tried rebooting my own comp and no problems here...

If you are able to successfully boot your system, try starting the btnx service with
sudo /etc/init.d/btnx start

Maybe that will give some indication as to what went wrong.

RVDowning
October 18th, 2007, 01:33 PM
Will try. Probably won't get to it until about 1700 EDT, after I get home.

daou
October 18th, 2007, 01:42 PM
Clarification:

You should have uninstalled btnx if your previous version was < v.0.3.0
And did you have a valid btnx_config file generated by the btnx-config GUI?

RVDowning
October 18th, 2007, 01:55 PM
You should have uninstalled btnx if your previous version was < v.0.3.0
And did you have a valid btnx_config file generated by the btnx-config GUI?

I didn't have to do any uninstalling of btnx, because I just did a new install of Mandriva 2008.0 (not an upgrade, but a new isntall.)

My previously installed btnx (on Mandriva 2008.0 a couple of days ago) was v0.3.2. I had a valid btnx_config file from btnx-config v0.2.0 the config file for which was overlayed by the config file from v0.2.1. At least I was hoping that the config file from the latter would just overlay the one from the former. I had only set two buttons (thumb wheel back and forward as page up and down respectively) just to use as a test. I did check the revoco checkbox on the latest version, though.

daou
October 18th, 2007, 03:34 PM
Ok, something just happened to my comp... screen is messed up because dual view blew up. My graphics card might be broken, I can get only one screen at a time (even from boot time).

I'm rolling back the btnx-0.3.3 update, just in case. I'll try to get it fixed once I get my own computer back in shape.

RVDowning
October 18th, 2007, 05:26 PM
I would get claustrophobic with only one screen. :)

My problem only seems to exist when /etc/udev/rules.d/99-btnx.rules is there. When I remove 99-btnx.rules the system boots fine. I had to try booting several times before I got a workable mouse. When I did, I noticed that there were about 15 copies of btnx running. I have a feeling that the perceived hang is just the system creating lots of btnx processes.

# /etc/init.d/btnx start causes no errors.

Content of 99-btnx.rules is:
BUS=="usb", SYSFS{idVendor}=="046d", SYSFS{idProduct}=="c51a", ACTION=="add", RUN+="/etc/init.d/btnx start"
BUS=="usb", SYSFS{idVendor}=="046d", SYSFS{idProduct}=="c51a", ACTION=="remove", RUN+="/etc/init.d/btnx stop"

daou
October 19th, 2007, 06:01 AM
I would get claustrophobic with only one screen. :)

My problem only seems to exist when /etc/udev/rules.d/99-btnx.rules is there. When I remove 99-btnx.rules the system boots fine. I had to try booting several times before I got a workable mouse. When I did, I noticed that there were about 15 copies of btnx running. I have a feeling that the perceived hang is just the system creating lots of btnx processes.

# /etc/init.d/btnx start causes no errors.

Content of 99-btnx.rules is:
BUS=="usb", SYSFS{idVendor}=="046d", SYSFS{idProduct}=="c51a", ACTION=="add", RUN+="/etc/init.d/btnx start"
BUS=="usb", SYSFS{idVendor}=="046d", SYSFS{idProduct}=="c51a", ACTION=="remove", RUN+="/etc/init.d/btnx stop"

I tried fixing the 0.3.3 version. Download it again from here:
http://www.ollisalonen.com/btnx/btnx-0.3.3.tar.gz

Again, if there are problems booting, just remove the 99-btnx.rules file. You can always regenerate it by pressing the "Save" or "Restart btnx" button in btnx-config.

This one has a little more intelligent PID file creation and process removal... there is a slight problem with the MX Revolution mouse because it is recognized twice by the system (one for the mouse, other for the search button). This causes udev to try to start btnx twice, which causes a bunch of other problems. Hopefully it's fixed now, I've been fighting this problem since v.0.3.0 ](*,). I'll release this version if it works well for you.

Now to start looking for a new dual-DVI gfx card ;)

RVDowning
October 19th, 2007, 09:03 AM
Still no go. Easiest way to recreate the problem is just to click the "Restart btnx" button in btnx-config. The btnx-config application hangs at that point. I can see that btnx has started, but my test buttons do not work.

If I try it again, namely killing btnx-config and reexecuting it again, and do the same thing, it will initiate a second occurrance of btnx, so that there will be two of them running. There couldn't be any weird permissions issues could there?

If I kill the btns that btnx-config has started, I will then get the error popup which says: Failed to execute command: "/etc/init.d/btnx restart". Make sure btnx is installed correctly.

I guess I will just learn to live with the two mouse buttons, until I get ambitious enough to dig through the documentation to see how to set the buttons up the standard way.

Thanks for your help. :)

daou
October 19th, 2007, 09:15 AM
Still no go. Easiest way to recreate the problem is just to click the "Restart btnx" button in btnx-config. The btnx-config application hangs at that point. I can see that btnx has started, but my test buttons do not work.

If I try it again, namely killing btnx-config and reexecuting it again, and do the same thing, it will initiate a second occurrance of btnx, so that there will be two of them running. There couldn't be any weird permissions issues could there?

If I kill the btns that btnx-config has started, I will then get the error popup which says: Failed to execute command: "/etc/init.d/btnx restart". Make sure btnx is installed correctly.

I guess I will just learn to live with the two mouse buttons, until I get ambitious enough to dig through the documentation to see how to set the buttons up the standard way.

Thanks for your help. :)

Ok, that is strange. I'm downloading Mandriva and will install it on another partition... curious to see what is wrong.

RVDowning
October 19th, 2007, 10:35 AM
Be careful!!! There is always the possibility that you will like Mandriva more than Ubuntu. :biggrin:

Drawde
October 19th, 2007, 02:58 PM
Is there a way to get program specific settings for buttons? I figure I could just make a script of some sort that the button would run that would send different keypresses for different programs, but I'm not sure how I would go about doing that. Does anyone know of any good resources for something like that?


EDIT: BTW I love this program! The interface is nice, the buttons are easy to set up, and it recognized the buttons on my mouse without any problems. It installed on my fresh 64-bit 7.10 setup without any problems. I can't thank you enough for your work on this program!

Curlydave
October 20th, 2007, 12:54 AM
I have an MX revolution and am just trying this again. I have 2 issues

1: My buttons aren't binding correctly. I can't get mouse 4 and 5 working, set up as KEY_LEFT and KEY_RIGHT with KEY_LEFTALT as a modifier. I can't get the search button to be Mouse3. Setting it to BTN_MIDDLE doesn't work, and setting it to BTN_3 gives an error. The button 4 acts as Mouse3, the button 5 acts as Mouse2. and I remember in an older version I could not only get this set up correctly, but it was set up correctly by default.

2: I like how it now supports the functionality of the scroll wheel, but is there a way to make it increase the speed you need to make it to go into free scroll mode? It does it too easily. It also keeps scrolling even if I stop the wheel.

daou
October 20th, 2007, 03:56 AM
Is there a way to get program specific settings for buttons? I figure I could just make a script of some sort that the button would run that would send different keypresses for different programs, but I'm not sure how I would go about doing that. Does anyone know of any good resources for something like that?


EDIT: BTW I love this program! The interface is nice, the buttons are easy to set up, and it recognized the buttons on my mouse without any problems. It installed on my fresh 64-bit 7.10 setup without any problems. I can't thank you enough for your work on this program!

I'm glad you find it useful!

This a feature I've been thinking about for a few months, but haven't been able to implement it yet. I was thinking of multiple configuration files, and then being able to tell to btnx which one of these to use... so you could bind a button to switch to different configurations (coding, gaming, internet, blender, gimp, etc).

Hopefully I'll have time to get it done some day.

daou
October 20th, 2007, 04:00 AM
I have an MX revolution and am just trying this again. I have 2 issues

1: My buttons aren't binding correctly. I can't get mouse 4 and 5 working, set up as KEY_LEFT and KEY_RIGHT with KEY_LEFTALT as a modifier. I can't get the search button to be Mouse3. Setting it to BTN_MIDDLE doesn't work, and setting it to BTN_3 gives an error. The button 4 acts as Mouse3, the button 5 acts as Mouse2. and I remember in an older version I could not only get this set up correctly, but it was set up correctly by default.

2: I like how it now supports the functionality of the scroll wheel, but is there a way to make it increase the speed you need to make it to go into free scroll mode? It does it too easily. It also keeps scrolling even if I stop the wheel.

Try changing your xorg.conf settings like described in the manual's troubleshooting section 9.2.1 (manual version 1.0) or 10.2.1 (manual version 1.1). Link to the manual is on the first post of this thread.

For the wheel, I assume you are using the automatic mode. Then, just change the up and down scroll speeds higher (default is 5, maybe 15 is better). These don't make your scroll speeds different, they control how fast you have to scroll the wheel to change modes.

RVDowning
October 20th, 2007, 09:03 AM
How did your install of Mandriva 2008 go? Which version did you install? After the installation of btnx you will notice that btnx appears in the Mandriva Control Center (menu item Configure Your Computer) under Services/Manage System Services......

It is not shown as started or to start at boot. However, as long as the 99-btnx.rules file is in /etc/udev/rules.d directory it attempts to start anyway. (and created 14 occurrences at boot this morning)

It was suggested to me that for Mandriva, perhaps btnx should be set up in a similar way to numlock, which is a service that can be started, stopped, or made to start on boot. The operative file is /etc/rc.d/init.d/numlock. It also appears as a system service in Mandriva Control Center.

Regards,

Rich

Curlydave
October 20th, 2007, 12:19 PM
Try changing your xorg.conf settings like described in the manual's troubleshooting section 9.2.1 (manual version 1.0) or 10.2.1 (manual version 1.1). Link to the manual is on the first post of this thread.

For the wheel, I assume you are using the automatic mode. Then, just change the up and down scroll speeds higher (default is 5, maybe 15 is better). These don't make your scroll speeds different, they control how fast you have to scroll the wheel to change modes.

Thanks for getting back to me so quickly. I didn't think to try adjusting those settings for the autoscroll; you assumed correctly that I assumed they set the scroll speed. I just tried editing my Xorg like above, and it broke my video. (I was pleasantly surprised to learn that in 7.10, breaking Xorg still lets you into gnome.) I'll experiment some more.

malk_dvorak
October 20th, 2007, 03:27 PM
i need some help here. ive got mx revolution running gutsy 64 bit

my xorg.conf looks as suggested
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/mice"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
Option "Buttons" "3"
EndSection

my btnx_config:

# This is a btnx configuration file generated by btnx-config

Mouse
vendor_id = 0x046d
product_id = 0xc51a
revoco_mode = 0
revoco_btn = 3
revoco_up_scroll = 5
revoco_down_scroll = 5
EndMouse

Button
name = left
rawcode = 0x01011000
enabled = 0
type = 0
delay = 0
keycode = NONE
mod1 = NONE
mod2 = NONE
mod3 = NONE
EndButton

Button
name = right
rawcode = 0x01011100
enabled = 0
type = 0
delay = 0
keycode = NONE
mod1 = NONE
mod2 = NONE
mod3 = NONE
EndButton

Button
name = search
rawcode = 0x01008800
enabled = 1
type = 0
delay = 0
keycode = BTN_MIDDLE
mod1 = NONE
mod2 = NONE
mod3 = NONE
EndButton

Button
name = backwards
rawcode = 0x01011300
enabled = 1
type = 0
delay = 0
keycode = KEY_LEFT
mod1 = KEY_LEFTALT
mod2 = NONE
mod3 = NONE
EndButton

Button
name = forward
rawcode = 0x01011400
enabled = 1
type = 0
delay = 0
keycode = KEY_RIGHT
mod1 = KEY_LEFTALT
mod2 = NONE
mod3 = NONE
EndButton

Button
name = thumb_press
rawcode = 0x01011c00
enabled = 0
type = 0
delay = 0
keycode = NONE
mod1 = NONE
mod2 = NONE
mod3 = NONE
EndButton

Button
name = thumb_back
rawcode = 0x01011a00
enabled = 1
type = 0
delay = 0
keycode = KEY_RIGHT
mod1 = KEY_LEFTCTRL
mod2 = KEY_LEFTALT
mod3 = NONE
EndButton

Button
name = thumb_right
rawcode = 0x01011800
enabled = 1
type = 0
delay = 0
keycode = KEY_LEFT
mod1 = KEY_LEFTCTRL
mod2 = KEY_LEFTALT
mod3 = NONE
EndButton


as for Xmodmap ive tried practically every mathemathically possible solution, it makes no difference


actually everything works except the back button pastes a 'D' if my mouse is over a terminal, forward button pastes a 'C' and the search button, which i use as middle button pastes whatever is on the clipboard when mouse is over a terminal, and occasionally whatever window i click starts gliding over the screen, pressing the backbutton and its back to normal

plase help, and if theres anything else u need to know let me know

mollison
October 20th, 2007, 07:30 PM
I have a Logitech VX Nano. I'm trying to get one of the extra buttons working (the "up" button to the left of the left click), and I can get it to do what I want (advance through tabs in Firefox), but it ALSO behaves as a right-click. So it pops up the right-click menu every time I click on it. How can I get rid of that?

Curlydave
October 21st, 2007, 11:41 AM
Does anyone remember the old Xorg file setup for the MX Revolution? I remember the old btnx either set it up for you or told you how. It looked nothing like what's in the new guide, but I don't remember any specifics.

TehLeProsy
October 23rd, 2007, 01:52 AM
Hi I am running gutsy 64bit with a MS trackball explorer 1(my vendor id is 0x045e, and my prouduct id is 0x0024).
Btnx installed fine and deteced my mouse and buttons. I only detected my back and forward buttons then configured them and enabled them.
However I get no responce from the buttons, I checked them in firefox the file browser. The trouble shooter said to stop btnx and start it with commandline this is what it returned.

Opened handler: /dev/input/event0
Opened handler: /dev/input/event1
Opened handler: /dev/input/event2
Opened handler: /dev/input/event3
Opened handler: /dev/input/event4
Opened handler: /dev/input/event5
Opened handler: /dev/input/event6
Opened handler: /dev/input/event7
Opened handler: /dev/input/event8
Opened handler: /dev/input/uinput
Opened handler: /dev/input/uinput
revco not started. Disabled in configuration.
No startup errors

I edited my xorg.conf to look like the one in the trouble shooting guide,
except my identifier which is "Configured mouse". I also had a diff device directory, "/dev/input/mice"; but neither directory is working.

So, have I configured something wrong? Or is my mouse not supported mabye?

Thanks.

chyrania
October 23rd, 2007, 02:23 PM
Why do we have to do all of this just to get forward and back navigation to work with firefox? I thought complex configuration was going to be eliminated from ubuntu.

Depressed Man
October 23rd, 2007, 05:47 PM
Well, for most of these things it's a problem with the hardware (which usually requires drivers). Of course none of these companies offer drivers usually, meaning it has to be built up from the ground by people. The people who work on Ubuntu spend most of their time designing the actual operating system itself. Not the drivers for the hardware.

Think about it this way. If you have a logitech mouse you have to install the drivers (setpoint) in Windows to get everything working. Otherwise you only have the three main buttons (plus scroll) working only. Don't install setpoint? Well all those buttons are useless. And it'd be crazy if the people who worked on the operating system had to work on both the operating system and drivers for the wide range of hardware out there. Hell Microsoft can't even do it (the only reason why most hardware works with them is because they've been in the operating system business since the beginning and wound up with a large large marketshare so companies have to make stuff that works on a Microsoft OS).

Of course what you could do is try to get everyone to use a uniform system of designing hardware so writing the drivers won't be so hard . But that's harder then even asking the companies to have support for Linux lol.

Perrako
October 23rd, 2007, 09:05 PM
Hey Daou,
I had this problem a while ago and it's reappearing. I reinstalled Sabayon recently (gentoo based) and tried to use btnx-config. However, after I detect buttons and hit ok, it just crashes. If I run from the terminal, it says "Aborted" and in gdb it just gives a sigsev fault. My GTK+- is totally updated, but I'm still having this problem.

Thanks.

jkernsjr
October 23rd, 2007, 10:55 PM
Dude, Fantastic application!

I just purchased a Logitech VX Nano and was trying to figure out how to configure all the buttons. I tried a couple of other How-To's but yours is by far the easiest! Now if you can just get some binaries out there and maybe get it in the repositories.

One question...my VX Nano is not recognized by revoco although it has the same features as the MX Revolution. I looked at Froeses' site and it seems he has just not added it as one of the detected mice. Can I get this to work somehow? Do I need to go directly to Froese and get him to add it to revoco? I tried to fool btnx by manually changing the btnx_config but it just reverted back to saying I didnt have an MX Revolution?

Logitech VX Nano
Vendor ID....0x046d
Product ID...0xc521

bwiklak
October 24th, 2007, 12:38 PM
Hi,
I successfully used btnx under Fiesty. After upgrade to Gutsy by bottons stops working after I reboot.
When I reconfigure mouse in btnx-config (clean config and configure again) mouse works well.

I tried restarting, stopping service and running as background aplication, "touching" config file and nothing. Xev, and hexing dump from events shows that buttons are recognized but co configured action (for eg. button event) is triggered.

Please help!

daou
October 25th, 2007, 04:14 AM
How did your install of Mandriva 2008 go? Which version did you install? After the installation of btnx you will notice that btnx appears in the Mandriva Control Center (menu item Configure Your Computer) under Services/Manage System Services......

It is not shown as started or to start at boot. However, as long as the 99-btnx.rules file is in /etc/udev/rules.d directory it attempts to start anyway. (and created 14 occurrences at boot this morning)

It was suggested to me that for Mandriva, perhaps btnx should be set up in a similar way to numlock, which is a service that can be started, stopped, or made to start on boot. The operative file is /etc/rc.d/init.d/numlock. It also appears as a system service in Mandriva Control Center.

Regards,

Rich

Installed Mandriva, and I must say I am impressed. Very nice work. However, I was unable to detect my mouse, except for the search button. I didn't have time to start troubleshooting it. I'll give it another look in a week or so when I have time again.

daou
October 25th, 2007, 04:19 AM
i need some help here. ive got mx revolution running gutsy 64 bit

my xorg.conf looks as suggested
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/mice"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
Option "Buttons" "3"
EndSection

as for Xmodmap ive tried practically every mathemathically possible solution, it makes no difference

actually everything works except the back button pastes a 'D' if my mouse is over a terminal, forward button pastes a 'C' and the search button, which i use as middle button pastes whatever is on the clipboard when mouse is over a terminal, and occasionally whatever window i click starts gliding over the screen, pressing the backbutton and its back to normal

plase help, and if theres anything else u need to know let me know

Try changing your InputDevice Device to "/dev/psaux".

In Linux, the middle button actually pastes highlighted text from any window when you press it over any text input (text boxes, terminal), so it is working like it's supposed to.

daou
October 25th, 2007, 04:21 AM
I have a Logitech VX Nano. I'm trying to get one of the extra buttons working (the "up" button to the left of the left click), and I can get it to do what I want (advance through tabs in Firefox), but it ALSO behaves as a right-click. So it pops up the right-click menu every time I click on it. How can I get rid of that?

Try this:

Try changing your xorg.conf settings like described in the manual's troubleshooting section 9.2.1 (manual version 1.0) or 10.2.1 (manual version 1.1). Link to the manual is on the first post of this thread.

daou
October 25th, 2007, 04:27 AM
Does anyone remember the old Xorg file setup for the MX Revolution? I remember the old btnx either set it up for you or told you how. It looked nothing like what's in the new guide, but I don't remember any specifics.

The old btnx did not change your xorg.conf file. I would have mob outside my door if my program played around with people's xorg.conf and gave them crashing x-sessions ;) . The old guide gave the same advice for xorg.conf as the manual. The manual is based on old problems with btnx and their possible solutions.

daou
October 25th, 2007, 04:51 AM
Why do we have to do all of this just to get forward and back navigation to work with firefox? I thought complex configuration was going to be eliminated from ubuntu.

This is a step closer to less configuration. You'd know what I mean if you have tried the other mouse howto's and combining them with 2+ other tools to get the functionality you need. But part of the reasoning for complex configuration is to allow people to make complex configurations on top of simple ones. This is something that unfortunately scares away newcomers, but satisfies the veterans.

The old btnx started working right away after installation. But the new version is more generic, which means it will work with more mice with a little more effort on the user's part during configuration. Imagine Logitech coding their SetPoint software to work with other manufacturers' mice. Not exactly something that is easily made automatic.

Well, for most of these things it's a problem with the hardware (which usually requires drivers). Of course none of these companies offer drivers usually, meaning it has to be built up from the ground by people. The people who work on Ubuntu spend most of their time designing the actual operating system itself. Not the drivers for the hardware.

Think about it this way. If you have a logitech mouse you have to install the drivers (setpoint) in Windows to get everything working. Otherwise you only have the three main buttons (plus scroll) working only. Don't install setpoint? Well all those buttons are useless. And it'd be crazy if the people who worked on the operating system had to work on both the operating system and drivers for the wide range of hardware out there. Hell Microsoft can't even do it (the only reason why most hardware works with them is because they've been in the operating system business since the beginning and wound up with a large large marketshare so companies have to make stuff that works on a Microsoft OS).

Of course what you could do is try to get everyone to use a uniform system of designing hardware so writing the drivers won't be so hard . But that's harder then even asking the companies to have support for Linux lol.

This is partly true. However, there is a lot in the Linux kernel that already allows these special mice to work to a great extent. I think the window managers are partly to blame here. The kernel already sends button information to X, and from there to Gnome etc. But there is no way to configure these buttons in the window managers to do anything.

daou
October 25th, 2007, 04:54 AM
Hey Daou,
I had this problem a while ago and it's reappearing. I reinstalled Sabayon recently (gentoo based) and tried to use btnx-config. However, after I detect buttons and hit ok, it just crashes. If I run from the terminal, it says "Aborted" and in gdb it just gives a sigsev fault. My GTK+- is totally updated, but I'm still having this problem.

Thanks.

You could try using the old btnx instead, if your mouse is supported by it. Did you install the newest version of btnx-config and btnx?

Do you know what version of gtk-libs you have? Give me the output of this command:
pkg-config --modversion gtk+-2.0

daou
October 25th, 2007, 05:00 AM
Dude, Fantastic application!

I just purchased a Logitech VX Nano and was trying to figure out how to configure all the buttons. I tried a couple of other How-To's but yours is by far the easiest! Now if you can just get some binaries out there and maybe get it in the repositories.

One question...my VX Nano is not recognized by revoco although it has the same features as the MX Revolution. I looked at Froeses' site and it seems he has just not added it as one of the detected mice. Can I get this to work somehow? Do I need to go directly to Froese and get him to add it to revoco? I tried to fool btnx by manually changing the btnx_config but it just reverted back to saying I didnt have an MX Revolution?

Logitech VX Nano
Vendor ID....0x046d
Product ID...0xc521

Try this:
In the btnx source folder, change line 59 in revoco.c to
#define MX_REVOLUTION 0xc521
Then, in btnx-config source folder (btnx-config-0.2.1/src) change line 22 in revoco.h to #define REV_PRODUCT1 0xC521

Then recompile both programs, install them, and fully test the revoco functionality. If it works, I'll include the changes in the next btnx version.

malk_dvorak
October 25th, 2007, 10:53 AM
daou:
Try changing your InputDevice Device to "/dev/psaux".
this made no difference. thanks for clearing up the middle click thing but the back and forward buttons still paste a D and C :/

also btnx seems to stop working once in a while and i have to restart it

dr.koljan
October 25th, 2007, 02:38 PM
Is there ever going to be a binary package for btnx?

Thanks.

The_Hellhound
October 26th, 2007, 01:26 PM
I just tried BTNX and it does not seem to recognize my mouse. I have a Logitech G5 usb mouse. I am also running Kubuntu 7.10 Gutsy Gibbon. I have not installed any other button modifying programs, but i have setup xorg and created a modmap following this website (http://adterrasperaspera.com/blog/2006/06/20/logitech-g5-review-under-linux/)

All my buttons work fine in firefox, compiz, and other programs, but I would like ot use the same back and forward tilt buttons I use in Firefox for Dolphin. I have changed Dolphin's shortcuts to match firefox's (alt-left, etc.) but this did not help. If I press alt-left on my keyboard it works, but not using the tilt left on my mouse.

I have been told by numerous sources to try btnx to get this working correctly. I received no errors during the install that I saw. I also installed BTNX 0.3.2 and BTNX-Config 0.2.1. There is no error when the program is trying to find my mouse, it just doesn't respond. When I launch sudo ./btnx i get the following:
uinput modprobed successfully.
Could not read the config file: No such file or directory
Error: configuration file error.

I have tried to uninstall and reinstall several times but still receive the same.

Perrako
October 26th, 2007, 11:12 PM
So, I tried using Btnx 3.0 and it still crashes. When I type pkg-config --modversion gtk+-2.0, I get: 2.10.11, which is the highest I can emerge to.

Akegata
October 27th, 2007, 07:36 AM
btnx-config is definetly a good step forward in making mx configuration easier. :)

I have a strange problem though. I've mapped my lower thumb button to alt+left and thus use it as Back in browsers.
However, every now and then it goes nuts and goes back several pages, it just keeps repeating itself until I press esc (or alt..not sure which one actually stops it). Does anyone have any idea what could be causing this?

shimoda
October 27th, 2007, 10:18 AM
Hi daou...

I have a little question...

I upgraded to btnx 0.3.3.
It works fine but at boot time, in text appear "btnx failed to start"... And after that "btnx succesfully started"...

It's normal? Can I do something to change this?

Thanks!

btnx-config is definetly a good step forward in making mx configuration easier. :)

I have a strange problem though. I've mapped my lower thumb button to alt+left and thus use it as Back in browsers.
However, every now and then it goes nuts and goes back several pages, it just keeps repeating itself until I press esc (or alt..not sure which one actually stops it). Does anyone have any idea what could be causing this?
I have the same problem... ;)

techstop
October 28th, 2007, 07:56 AM
Are you using the Alt+Left and Alt+Right for back and forward? KEY_LEFTALT+KEY_RIGHT, KEY_LEFTALT+KEY_LEFT

Sorry for the late reply, I clean installed Gutsy in the meantime and tried again. I noticed before I had installed btnx I was getting the odd behaviour as before, ie forward button on the mouse was doing a right-click in firefox and nautilus. I reconfigured xorg.conf a few times and the problem went away (I can't remember what I did)

Then I installed btnx, and everything works perfectly! (I was using KEY_LEFTALT+KEY_RIGHT, KEY_LEFTALT+KEY_LEFT btw) No random right-clicks anymore. I have even mapped the search button on my VX Revolution to use the deskbar applet that is included in Gutsy. Tres cool!

I have got to say, many thanks for your awesome software, it makes configuring your mouse in Ubuntu so much easier than it ever used to be, and this kind of thing really should be included by default.

Thanks again for all your work, I am really happy with ubuntu and my mouse now! :mrgreen:

Sensenseppl
October 29th, 2007, 05:24 PM
Thanks a lot, everything works like a charm now! =D>

I encountered a little problem, though. If you manually write something like "KEY_E KEY_B" in the keycode input field, you get a "Wrong keycode" popup-infinite-loop. I guess I deserve it, but I don't think you wanted it to work like that. :) (Sorry, if somebody already posted this, but I was too lazy to read all the posts.)

smoothifier
October 30th, 2007, 10:52 AM
I am having issues with mapping the search button on a MX Revolution mouse to mouse button 2 (mimicking the middle button paste).

I installed mvmouse and I have btnx-config set to execute this command:


/usr/bin/mvmouse +0 +0 2


This works fine if I save and restart btnx from within btnx-config, but fails on a reboot, even if I restart the service from the command line. All other buttons work fine, and all other buttons are keymap commands. The only one that fails is the command-line button.

RVDowning
October 30th, 2007, 06:08 PM
It kind of looks like this is a dead issue for distributions other than *buntu. Does anyone know where to find the documentation to set up mouse buttons using the "standard" methodology? That way may not be pretty, but ugly is better than nothing.

trmiv
October 30th, 2007, 08:42 PM
I just bought a Logitech MX620, is it possible to get it working in btnx?

It detected as the following:

Vendor ID: 0x046d
Product ID: 0xc521

Same exact product id as the VX Nano.

techstop
October 30th, 2007, 10:01 PM
I just bought a Logitech MX620, is it possible to get it working in btnx?

It detected as the following:

Vendor ID: 0x046d
Product ID: 0xc521

Same exact product id as the VX Nano.

Have you tried? :confused:

JayBee808
October 30th, 2007, 10:59 PM
I have a strange problem though. I've mapped my lower thumb button to alt+left and thus use it as Back in browsers.
However, every now and then it goes nuts and goes back several pages, it just keeps repeating itself until I press esc (or alt..not sure which one actually stops it). Does anyone have any idea what could be causing this?

I'm having the same issue. Pressing the left ALT on the keyboard seems to stop it. I've also had problems with the scroll wheel adjusting the opacity of a window (running compiz). It seems the ALT key is "sticking" after using the thumb button occasionally. ALT+Scroll is supposed to adjust opacity. Again, pressing the ALT key releases it, and the mouse functions as expected. I'm guessing something is causing ALT to act like it is being held down. I get a few other odd mouse actions once in a while, and they all appear to be related to this.

Other than that, BTNX is great, and has been an excellent solution to a multi-button mouse!

trmiv
October 30th, 2007, 11:21 PM
Have you tried? :confused:

I did and it didn't work. But I've been messing around with it and changed the xorg.conf to the one in the instructions and now it works. I had originally changed the xorg.conf to get the back/foward working on this mouse. Seems to work great now with the more generic xorg config though!

Now if I could only decide something to do with the tilt buttons. :)

smoothifier
October 31st, 2007, 07:23 AM
I finally got this working!

Download mvmouse (http://ubuntuforums.org/attachment.php?attachmentid=5244&d=1136859260) , decompress and put in /usr/sbin. Make sure you do a
chmod +x /usr/sbin/mvmouse
Add user root to the X server access list. I think this is necessary because mvmouse runs on the X display. Edit /root/.bashrc and add the following line (change username to your login id):
export XAUTHORITY=/home/username/.Xauthority
After detecting the search button in btnx-config, change Event Type to Command Execution. Add the following in the Execute Command box:
/usr/bin/mvmouse -display :0 +0 +0 2
That should wrap it up. Paste away!

I am having issues with mapping the search button on a MX Revolution mouse to mouse button 2 (mimicking the middle button paste).

I installed mvmouse and I have btnx-config set to execute this command:


/usr/bin/mvmouse +0 +0 2


This works fine if I save and restart btnx from within btnx-config, but fails on a reboot, even if I restart the service from the command line. All other buttons work fine, and all other buttons are keymap commands. The only one that fails is the command-line button.

techstop
October 31st, 2007, 07:42 AM
I did and it didn't work. But I've been messing around with it and changed the xorg.conf to the one in the instructions and now it works. I had originally changed the xorg.conf to get the back/foward working on this mouse. Seems to work great now with the more generic xorg config though!

Now if I could only decide something to do with the tilt buttons. :)

Good to hear...It would be good to have a list of standard keyboard shortcuts so we can program our mouses.

RVDowning
October 31st, 2007, 08:15 PM
I finally got btnx working under Mandriva. I copied the btnx executable to /etc/rc.d/init.d and edited /etc/rc5.d/S99local and added the line /etc/init.d/btnx -b start

One problem that I've noticed pertains to Revoco. I have Click-to-click-mode set, but after some period of activity it somehow reverts to Free-scroll-mode. I've had to change it back a couple of times in the last hour or so. It is too early to determine any pattern.

I do have to kill btnx if I want to change the config file, so that I can then restart it, since I have no way to stop it otherwise.

Akegata
November 1st, 2007, 04:25 AM
One problem that I've noticed pertains to Revoco. I have Click-to-click-mode set, but after some period of activity it somehow reverts to Free-scroll-mode.

I'm having almost the same problem. revoco switches to making the scroll wheel the active click-to-click button.
However, there is an obvious bug in btnx-config here.

If you for instance set revoco to manual, save the config, restart btnx, clost btnx-config and then start btnx-config again and go to the revoco tab, it will be set to Free-scroll mode.
This of course means that if you ever fire up btnx-config and change anything without setting the revoco settings _every time_, the revoco settings will be lost.

I don't think that's related to the bug which resets revoco to free scroll or changes the click-to-click button, but it's a bug nonetheless. :P

daou
November 1st, 2007, 04:36 AM
Is there ever going to be a binary package for btnx?

Thanks.

I noticed someone submitted btnx to the Ubuntu repository wishlist. Perhaps it will be "apt-gettable" one day.

I've decided from the beginning not to make binaries myself, because this takes time away from actually developing and improving btnx (which I have little of, anyway).

However, someone (who you can thank for the revoco idea) proposed to me over email to help make binary packages at some point, so they might be available in the future.

Of course, anyone can do the packaging with a little effort and research. I will upload them to the server if someone submits binary packages.

daou
November 1st, 2007, 04:38 AM
I'm having almost the same problem. revoco switches to making the scroll wheel the active click-to-click button.
However, there is an obvious bug in btnx-config here.

If you for instance set revoco to manual, save the config, restart btnx, clost btnx-config and then start btnx-config again and go to the revoco tab, it will be set to Free-scroll mode.
This of course means that if you ever fire up btnx-config and change anything without setting the revoco settings _every time_, the revoco settings will be lost.

I don't think that's related to the bug which resets revoco to free scroll or changes the click-to-click button, but it's a bug nonetheless. :P

The revoco functionality was slapped together quite quickly for the last release. I did notice something strange with it as well. Thanks for isolating the bug, I know what must be causing it. I will fix this in the coming days.

daou
November 1st, 2007, 04:42 AM
I just tried BTNX and it does not seem to recognize my mouse. I have a Logitech G5 usb mouse. I am also running Kubuntu 7.10 Gutsy Gibbon. I have not installed any other button modifying programs, but i have setup xorg and created a modmap following this website (http://adterrasperaspera.com/blog/2006/06/20/logitech-g5-review-under-linux/)

All my buttons work fine in firefox, compiz, and other programs, but I would like ot use the same back and forward tilt buttons I use in Firefox for Dolphin. I have changed Dolphin's shortcuts to match firefox's (alt-left, etc.) but this did not help. If I press alt-left on my keyboard it works, but not using the tilt left on my mouse.

I have been told by numerous sources to try btnx to get this working correctly. I received no errors during the install that I saw. I also installed BTNX 0.3.2 and BTNX-Config 0.2.1. There is no error when the program is trying to find my mouse, it just doesn't respond. When I launch sudo ./btnx i get the following:
uinput modprobed successfully.
Could not read the config file: No such file or directory
Error: configuration file error.

I have tried to uninstall and reinstall several times but still receive the same.

It looks like you haven't detected the mouse and configured it. Make sure to run btnx-config first. Then use it to detect your mouse, configure the buttons, and save the configuration file. It should automatically restart btnx then.

By the way, I hope you didn't change the InputSection Driver to "evdev" like described in the link you posted. This usually causes problems for btnx.

daou
November 1st, 2007, 04:46 AM
Hi daou...

I have a little question...

I upgraded to btnx 0.3.3.
It works fine but at boot time, in text appear "btnx failed to start"... And after that "btnx succesfully started"...

It's normal? Can I do something to change this?

Thanks!


I have the same problem... ;)

I pulled back the 0.3.3 release (v.0.3.2 is the recommended) because I wasn't sure if it was stable. I am running it myself and it works just fine. I am getting the same "btnx failed to start" at boot. It seems that some process hasn't started during boot that btnx depends on. It's not really a problem (just looks annoying), because it will keep trying until it's possible to start btnx. However, I will be working to fix it soon.

daou
November 1st, 2007, 04:50 AM
btnx-config is definetly a good step forward in making mx configuration easier. :)

I have a strange problem though. I've mapped my lower thumb button to alt+left and thus use it as Back in browsers.
However, every now and then it goes nuts and goes back several pages, it just keeps repeating itself until I press esc (or alt..not sure which one actually stops it). Does anyone have any idea what could be causing this?

I've noticed this problem with my thumb wheel button sometimes. It's been happening for a long time. Sometimes it doesn't happen for weeks, then it happens a few times a day. I'm not exactly sure what the problem is. If it is not a hardware problem (ie the button fails to send a button released signal from the mouse) then it could be some sync issue with btnx. It might fail to send the release event under some rare circumstances (which makes it very difficult to debug).

I don't consider it an urgent bug (if it even is a bug with btnx). I'll look at it after some bigger issues.

daou
November 1st, 2007, 04:59 AM
I finally got btnx working under Mandriva. I copied the btnx executable to /etc/rc.d/init.d and edited /etc/rc5.d/S99local and added the line /etc/init.d/btnx -b start

One problem that I've noticed pertains to Revoco. I have Click-to-click-mode set, but after some period of activity it somehow reverts to Free-scroll-mode. I've had to change it back a couple of times in the last hour or so. It is too early to determine any pattern.

I do have to kill btnx if I want to change the config file, so that I can then restart it, since I have no way to stop it otherwise.

I will fix the revoco issue. The generic distro issue is not dead, don't worry. I'll start working on it tonight, now that my university exams are over.

daou
November 1st, 2007, 05:02 AM
Sorry for the late reply, I clean installed Gutsy in the meantime and tried again. I noticed before I had installed btnx I was getting the odd behaviour as before, ie forward button on the mouse was doing a right-click in firefox and nautilus. I reconfigured xorg.conf a few times and the problem went away (I can't remember what I did)

Then I installed btnx, and everything works perfectly! (I was using KEY_LEFTALT+KEY_RIGHT, KEY_LEFTALT+KEY_LEFT btw) No random right-clicks anymore. I have even mapped the search button on my VX Revolution to use the deskbar applet that is included in Gutsy. Tres cool!

I have got to say, many thanks for your awesome software, it makes configuring your mouse in Ubuntu so much easier than it ever used to be, and this kind of thing really should be included by default.

Thanks again for all your work, I am really happy with ubuntu and my mouse now! :mrgreen:

No problem. I'm glad you are enjoying btnx and got the problems sorted out. Would you attach your xorg.conf on this thread so I can have a look at what values you used?

daou
November 1st, 2007, 05:07 AM
Thanks a lot, everything works like a charm now! =D>

I encountered a little problem, though. If you manually write something like "KEY_E KEY_B" in the keycode input field, you get a "Wrong keycode" popup-infinite-loop. I guess I deserve it, but I don't think you wanted it to work like that. :) (Sorry, if somebody already posted this, but I was too lazy to read all the posts.)

The key drop-down-auto-completion-entry-box :-k is a little buggy. I'm not too happy with it myself. It's a bit of a hack. However, it is better than the old plain drop-down box because there are hundreds of values.

What does everyone think: would it be better that the key value entry was a simple button that opens a new dialog? This dialog would have a list of the keys and an auto-completion-entry at the top, and an OK button to confirm the selection. Would it make the interface better?

daou
November 1st, 2007, 05:11 AM
I am having issues with mapping the search button on a MX Revolution mouse to mouse button 2 (mimicking the middle button paste).

I installed mvmouse and I have btnx-config set to execute this command:


/usr/bin/mvmouse +0 +0 2
This works fine if I save and restart btnx from within btnx-config, but fails on a reboot, even if I restart the service from the command line. All other buttons work fine, and all other buttons are keymap commands. The only one that fails is the command-line button.

I'll do some testing of the command execution. However, you can just map the search button to "BTN_MIDDLE" and it will work like the middle button (pasting highlighted text). Or, you can use the revoco functions to set your wheel to a different mode. Then you can actually use your wheel click like on normal mice.

EDIT: it seems that you got it working. It was apparently an issue with user permissions on X.

daou
November 1st, 2007, 05:15 AM
Good to hear...It would be good to have a list of standard keyboard shortcuts so we can program our mouses.

I posted a few months ago on this thread asking people to submit useful key combos for this purpose. No one submitted any, so no list exists.

RVDowning
November 1st, 2007, 08:40 AM
I'm having almost the same problem. revoco switches to making the scroll wheel the active click-to-click button.
However, there is an obvious bug in btnx-config here.

If you for instance set revoco to manual, save the config, restart btnx, clost btnx-config and then start btnx-config again and go to the revoco tab, it will be set to Free-scroll mode.
This of course means that if you ever fire up btnx-config and change anything without setting the revoco settings _every time_, the revoco settings will be lost.

I don't think that's related to the bug which resets revoco to free scroll or changes the click-to-click button, but it's a bug nonetheless. :P

That may have been my problem. I may have been starting and stopping btnx as I added more button functionality. I'll just wait to see what happens when I'm back on that machine again this evening.

RVDowning
November 1st, 2007, 08:46 AM
I will fix the revoco issue. The generic distro issue is not dead, don't worry. I'll start working on it tonight, now that my university exams are over.

Oh, ........ and I thought it was a woman interfering. :) I was going to have to talk to your relationship manager.....

daou
November 1st, 2007, 09:10 AM
Oh, ........ and I thought it was a woman interfering. :) I was going to have to talk to your relationship manager.....

That and the exams... I barely had time to eat ;) .

shimoda
November 1st, 2007, 10:26 AM
I pulled back the 0.3.3 release (v.0.3.2 is the recommended) because I wasn't sure if it was stable. I am running it myself and it works just fine. I am getting the same "btnx failed to start" at boot. It seems that some process hasn't started during boot that btnx depends on. It's not really a problem (just looks annoying), because it will keep trying until it's possible to start btnx. However, I will be working to fix it soon.
ok, thanks for your answer! ;)