View Full Version : btnx: Send keyboard and mouse combination events with mouse buttons
daou
May 26th, 2007, 08:34 PM
If you find this tool useful, please help others use it by translating it into another language: btnx-config @ Launchpad (http://launchpad.net/btnx-config).
Latest versions:
btnx-0.4.11 - ChangeLog (http://svn.ollisalonen.com/btnx/trunk/ChangeLog)
btnx-config-0.4.9 - ChangeLog (http://svn.ollisalonen.com/btnx-config/trunk/ChangeLog)
btnx (Button Extension) is a daemon that enables rerouting of mouse button events through uinput as keyboard and other mouse button combinations. For example, you can configure an extra mouse button to send a Ctrl+Alt+Right command to switch workspaces. You can also configure buttons to execute commands. This is especially useful for mice with more buttons than Gnome or KDE can properly handle, or mice that need evdev and a 100 step howto to register button events at all.
btnx-config is GUI for detecting and configuring your mouse. You must use btnx-config with btnx. btnx integrates revoco functionality for MX Revolution users, which is editable from btnx-config.
btnx should work with almost any mouse that is configured properly.
The btnx manual is available at: http://www.ollisalonen.com/btnx/man
btnx is known to work on:
(K)Ubuntu 7.04
(K)Ubuntu 7.10
(K)Ubuntu 8.04
Note: Users with an MX or VX Revolution: if you have problems with the thumb buttons, refer to the btnx manual's troubleshooting section 12.2.1 for better xorg.conf values.
Report bugs at Launchpad:
http://launchpad.net/btnx
http://launchpad.net/btnx-config/
SVN repositories :
btnx: http://svn.ollisalonen.com/btnx/
btnx-config: http://svn.ollisalonen.com/btnx-config/
-------------------------------------------------------------------------------------------------
Installation:
You have two options. Either install (1) binary packages with apt-get or (2) compile from source.
Note: If you have used another howto to configure your mouse, try to revert as much of the changes you have done.
1. Binary packages:
Note: KDE (Kubuntu) users should compile from source if you want to avoid installing lots of standard Gnome libraries.
1. Put the following lines to the end of your /etc/apt/sources.list file, but replace DISTRO with the name of the Ubuntu distro you have installed (options: feisty gutsy hardy):
deb http://ppa.launchpad.net/daou/ubuntu DISTRO main
deb-src http://ppa.launchpad.net/daou/ubuntu DISTRO main
2. Now, run the following commands to install btnx and btnx-config:
$ sudo apt-get update && sudo apt-get install btnx3. Run btnx-config from Applications->System tools->btnx and refer to the manual as necessary.
2. (Optional) Compile from source
1. 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. btnx needs build-essential and libdaemon.
sudo apt-get install build-essential libgtk2.0-0 libgtk2.0-dev libglade2-0 libglade2-dev pkg-config libdaemon0 libdaemon-dev2. Install btnx
$ wget http://www.ollisalonen.com/btnx/btnx-0.4.11.tar.gz
$ tar -xvvf btnx-0.4.11.tar.gz
$ cd btnx-0.4.11
$ ./configure
$ make
$ sudo make install3. Install btnx-config.
$ wget http://www.ollisalonen.com/btnx/btnx-config-0.4.9.tar.gz
$ tar -xvvf btnx-config-0.4.9.tar.gz
$ cd btnx-config-0.4.9
$ ./configure
$ make
$ sudo make installIf you encountered an error, there is probably a dependency problem.
4. You should have gotten a menu item. In GNOME, Applications->System tools->btnx. In KDE, System->btnx. Press it to launch btnx-config.
You can find all the necessary information for configuring your mouse with btnx-config in the btnx manual. Either press the "Help" button in btnx-config or refer to the online manual at http://www.ollisalonen.com/btnx/man
--------------------------------------------------------------------------------------------------
Uninstall
Binary packages:
Run
$sudo apt-get remove btnx btnx-config
Compiled source:
To uninstall btnx and btnx-config, run
$ sudo make uninstallin the same directory as where you ran the "sudo make install" command for both programs.
--------------------------------------------------------------------------------------------------
Troubleshooting
Please refer to the troubleshooting section in the btnx manual: http://www.ollisalonen.com/btnx/man
It contains answers to frequent problems and good reference values for your xorg.conf file.
NOTE: If some of your mouse buttons send multiple events (like extra middle, right, or left clicks) then refer to the
manual's troubleshooting section on editing you xorg.conf InputSection. Follow it closely!
If your problem persists, post it on this thread.
--------------------------------------------------------------------------------------------------
Useful key combos
blazoner posted a list of some useful keyboard combinations to use with btnx. Look here (http://ubuntuforums.org/showpost.php?p=4562391&postcount=860).
--------------------------------------------------------------------------------------------------
If you feel that btnx or extra mouse button control is an important issue, don't forget to let your vote and voice be heard over at Brainstorm:
http://brainstorm.ubuntu.com/idea/120/image/1/ (http://brainstorm.ubuntu.com/idea/120/)
daou
May 28th, 2007, 01:36 AM
btnx discussion has been moved here from the MX Revolution howto (http://ubuntuforums.org/showthread.php?t=277388).
you got my vote to get btnx in kubuntu gutsy as a standard once it comes out - Mack1Thanks :D. But I think btnx will need to support a few more mice before that will come into consideration.
MX-510 will be added later today. Thanks to sjust for the hexdumping.
I just bought an MX Revolution today, and I can't seem to get btnx to make any difference whatsoever...
Maybe I'm doing something wrong...? - Bedpan.caAre you running the latest version (at this time 0.2.3)? If you are, did you change the default configurations? If you did, try copying the mx revolution defaults over the btnx_config file:
$ sudo cp /etc/btnx/defaults/default_config_mxrevo /etc/btnx/btnx_config
$ sudo /etc/init.d/btnx restartIf it still doesn't work try stopping btnx and running it as a foreground process on the command line. This way you can see any error output.
$ sudo /etc/init.d/btnx stop
$ sudo /usr/sbin/btnxTell me what happens.
daou
May 28th, 2007, 11:22 AM
Support added for Logitech MX-510 in version 0.2.4. Thanks to sjust for submitting the hexdumps.
sjust: If you already configured Ubuntu to use the extra buttons on your MX-510 with, for example, detyabozhye's guide, you should probably disable the settings so you won't get duplicate events. btnx cannot stop any events from happening that X already handles. This is not a must, you can try running btnx with the old settings intact.
sjust
May 28th, 2007, 12:26 PM
I am glad I did everything right, and it helped. yes I have used his guide to configure my mouse. I will disable what I can remember and give btnx a shot. I will post back with the resualts
Bedpan.ca
May 28th, 2007, 06:16 PM
Tell me what happens.
Did what you said, and still no dice.
When ran as a foreground process, it says "No startup errors".
Tried the latest 0.2.4 just in case something was different, but again, the mouse does nothing other than the default mousey functions (plus scroll wheel and the stupid backwards sideways scroll wheel tilt).
I'm running 64bit Feisty.
daou
May 29th, 2007, 12:38 AM
I'm running 64bit Feisty.This could be a problem because btnx looks at raw data streams that are likely bitsize-dependent.
If you have the time, could you do the part "How to get support for mouse X?". If it turns out that the stream lengths are just a little different for 64-bit streams, I can easily add support for 64-bit systtems. EDIT: not necessary anymore.
If not, then it gets more difficult.
daou
May 29th, 2007, 01:06 PM
I'm running 64bit Feisty.
btnx-0.2.5 adds support for 64-bit versions. Installed the AMD64 version on a different partition and looked at the event handlers. As I suspected, the amount of data going to the event handlers during each event grew by 16 bytes. btnx now uses a better algorithm to calculate the rawcodes which is bit-independent.
Bedpan.ca
May 29th, 2007, 05:55 PM
btnx-0.2.5 adds support for 64-bit versions.
Freaking. Awesome.
You are now my hero as well.
Sweet deals. :D
Bedpan.ca
May 30th, 2007, 12:15 AM
Okay. This one is weird. I've noticed that if I have Konsole open, my mouse will sometime TYPE on its own a capital letter C.
The same is done when scrolling right (left is D).
Also, sometimes if I'm browsing with firefox, the page will sometimes jump backwards in history by itself.
Not sure if this is because of btnx, or a faulty mouse.
Ideas?
daou
May 30th, 2007, 01:25 AM
Okay. This one is weird. I've noticed that if I have Konsole open, my mouse will sometime TYPE on its own a capital letter C.
The same is done when scrolling right (left is D).
Also, sometimes if I'm browsing with firefox, the page will sometimes jump backwards in history by itself.
Not sure if this is because of btnx, or a faulty mouse.Not a faulty mouse. It sounds like btnx is just doing its magic. If you haven't changed btnx's default configuration for MX Revo mice, pressing the top wheel left and right sends ALT+LEFT and ALT+RIGHT signals. In Firefox it goes back and forward in page history. In a terminal, it outputs a C and D.
It's quite easy to accidentally press the wheel sideways when trying to scroll up and down on the MX Revo. It took me a while to get used to it. Don't use any force when scrolling the MX Revo wheel. It's meant to be touched lightly. It's not a normal, crude mouse wheel, after all ;).
If it seems annoying, you can disable the wheel tilts from doing anything in the btnx_config file by commenting it's button section out.
tregnaward
May 30th, 2007, 02:00 AM
seems like it would be fantastic, but i keep getting an
Error opening button event file descriptor: No such file or directory
when i run it in the foreground as mentioned above (to see why it's not working)
and, it's probably because i'm very new to this, but it took me quite a while to figure out that i didn't have build-essential installed to even get this far. would that be something to include in the instructions, or have i just not trolled the forums enough?
daou
May 30th, 2007, 05:06 AM
seems like it would be fantastic, but i keep getting an
Quote:
Error opening button event file descriptor: No such file or directory
when i run it in the foreground as mentioned above (to see why it's not working)
It looks like btnx can't open the file /dev/input/eventX
where X is some number. Either btnx parsed the event name incorrectly, or the event handler is located in some other directory. Or something else weird. What version of Ubuntu are you using?
Try this command:
ls /dev/input
It should print out files in that directory. Are there any named "event"?
I'll try updating the program later today so it will give more detailed error messages.
daou
May 30th, 2007, 05:17 AM
and, it's probably because i'm very new to this, but it took me quite a while to figure out that i didn't have build-essential installed to even get this far. would that be something to include in the instructions, or have i just not trolled the forums enough?
You are right, it should be included in the instructions.
Bedpan.ca
May 30th, 2007, 07:19 PM
It's quite easy to accidentally press the wheel sideways when trying to scroll up and down on the MX Revo.
If I move the mouse side to side with my fingers no where near the scroll wheel (holding the back of the mouse at pad-level), firefox jumps a page forward.
It doesn't happen all the time, but enough to start bugging the crap out of me :).
Depressed Man
May 30th, 2007, 07:20 PM
When I try using "modprobe uinput" (without the quotes) I get "FATAL: Error inserting uinput (/lib/modules/2.6.20-16-generic/kernel/drivers/input/misc/uinput.ko): Operation not permitted" (without quotes).
Any idea of what's going wrong? I have a VX Revolution notebook mouse so I'm trying to get it working.
Bedpan.ca
May 30th, 2007, 07:22 PM
When I try using "modprobe uinput" (without the quotes) I get "FATAL: Error inserting uinput (/lib/modules/2.6.20-16-generic/kernel/drivers/input/misc/uinput.ko): Operation not permitted" (without quotes).
Any idea of what's going wrong? I have a VX Revolution notebook mouse so I'm trying to get it working.
Try sudo modprobe uinput
Depressed Man
May 30th, 2007, 07:42 PM
Seems to run the command and return nothing. Is that the desired out come?
Bedpan.ca
May 30th, 2007, 07:44 PM
Yep.
modprobe doesn't have an output. It just loads the module which other programs can talk to.
Depressed Man
May 30th, 2007, 07:52 PM
Thanks! Followed all the steps and it works now! Now to customize the controls so it works with Beryl. :)
blazoner
May 30th, 2007, 07:56 PM
2 separate issues on 2 separate PC's running Ubuntu FF 7.04
OK, issue #1
MX Revolution mouse
I altered my btnx_config file to perform FORWARD/BACKWARD funtions with the thumb-wheel as shown
# 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
EndButtonbut my buttons are behaving as if the button event type is 0, instead of 1. (Pressing the thumb-wheel in either direction goes forward or backward respectively, but releasing the thumb-wheel does the same action again, for a net effect of going forward or backward twice.)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Issue #2
My second PC has an MX 600 mouse that I want to hexdump for you to play with.
When I use
$ cat /proc/bus/input/devices > ~/devices_outputmy mouse gives event1, but when I attempt to use
$ sudo cat /dev/input/event1 | hexdumpin terminal, I get no response at all from my system.
I'm new to Linux. Is there some extra component I need to be able to perform a hexdump? If not, what's my next step?
blazoner
May 30th, 2007, 09:39 PM
On another note, maybe future releases could include support for multiple button presses, like L+R buttons = Middle button.
I can't currently program, but I think I could lay out some usable logic for that. If you're interested, I'll give it a shot.
BTW, I love what you've accomplished so far!
Depressed Man
May 30th, 2007, 09:50 PM
Hmm it's stuck in read-only mode so I can't edit the config. How do I get it out of read only mode..it says root owns it. (sorry I'm still new to Linux..so there's probably some command to temporary take over the file that I don't know)
tregnaward
May 30th, 2007, 11:17 PM
i'm running 7.04
and when i ran ls /dev/input, i gotby-id event0 event3 event5 event9 mouse0 ts0 uinput
by-path event1 event4 event6 mice mouse1 ts1
daou
May 31st, 2007, 01:37 AM
If I move the mouse side to side with my fingers no where near the scroll wheel (holding the back of the mouse at pad-level), firefox jumps a page forward.
It doesn't happen all the time, but enough to start bugging the crap out of me :smile:.Ok, sounds like your MX Revo is borderline broken. I can shake my mouse pretty hard and the wheel won't go side to side by itself. You should probably try to get a replacement.
but my buttons are behaving as if the button event type is 0, instead of 1. (Pressing the thumb-wheel in either direction goes forward or backward respectively, but releasing the thumb-wheel does the same action again, for a net effect of going forward or backward twice.)It's the other way around. The event type is supposed to be 0 for the the thumb wheel events. When a button is type=1, it sends both the pressed and released events simultaneously. So when you press the thumb wheel and type=1, it sends a press and release signal. When you release the thumb wheel, it sends the press and release signals again. So you get two events.
More replies later...
blazoner
May 31st, 2007, 04:27 AM
Thanks! That did the trick.
Maybe instead of this:
# type: the type of event the button sends. If type is 0,
# pressing the button sends a button down signal and
# releasing it sends a release signal. If type = 1, clicking
# the button send both press and release signals simultaneously.
# This usually necessary for mouse wheel events.
You could say this:
# 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.
Since the type is dependent on the button events, and not the other way around.
daou
May 31st, 2007, 05:38 AM
Hmm it's stuck in read-only mode so I can't edit the config. How do I get it out of read only mode..it says root owns it. (sorry I'm still new to Linux..so there's probably some command to temporary take over the file that I don't know)run
sudo gedit /etc/btnx/btnx_configThe sudo is needed so you get root (or superuser) privileges, because the btnx_config file is write protected and owned by root. This is because btnx can only be run by root.
On another note, maybe future releases could include support for multiple button presses, like L+R buttons = Middle button.
I can't currently program, but I think I could lay out some usable logic for that. If you're interested, I'll give it a shot.
BTW, I love what you've accomplished so far!Thanks, I'm glad you like it. What you propose is doable. It would require a significant amount of change and complexity to the event parsing and handling. Not impossible, but time consuming. I'll keep it in mind and once I have the time, I might implement something like it.
You could say this:
...
Since the type is dependent on the button events, and not the other way around.Good point. I'll change it. Thanks for the improvement ideas.
i'm running 7.04
and when i ran ls /dev/input, i got Quote:
by-id event0 event3 event5 event9 mouse0 ts0 uinput
by-path event1 event4 event6 mice mouse1 ts1Strange. You have the event files in the correct location but for some reason btnx cannot find it. What mouse are you using?
Please send me the output of your /proc/bus/input/devices file. It will help me diagnose the problem. You can use this command to view that file in gedit:
cat /proc/bus/input/devices > /tmp/devices_output; gedit /tmp/devices_output
my mouse gives event1, but when I attempt to use
Code:
$ sudo cat /dev/input/event1 | hexdump
in terminal, I get no response at all from my system.
I'm new to Linux. Is there some extra component I need to be able to perform a hexdump? If not, what's my next step?I've noticed that this might be a problem with some mice (ones using PS/2 connector). But I would suspect the MX600 uses USB. You should have hexdump installed by default so this shouldnt be the problem. You can test it by giving the command:
$ echo "hello" | hexdump
If you get output like "0000000 6568 6c6c 0a6f" then hexdump should be working fine. The only other thing I can think of is that its not sending events to that event handler. Try doing that part where you list each event handler in /dev/input with the command:
ls /dev/inputAnd do the
sudo cat /dev/input/event | hexdumpcommand for each event file in that directory (event0, event1, etc.). Move your mouse and press its buttons everytime you do the hexdump. Then check your /proc/bus/input/devices for the section that matches that event. Hopefully one of the event files is outputting your mouse events, otherwise there is a bigger problem.
bornakke
May 31st, 2007, 10:06 AM
Minor issue:
Btnx worked out of the box, which was a great relief after being use to useing the old complicated way - so thank you very much :)
Well there is one thing that I can't seem to figure out. I'm use to useing the windows key (Super key), as my beryl shortcut. And since my I uses my mouse to the same shorthcut i would be nice to assign a button to let say windowskey+ left... But where is the key, can't seem to find it in the event file... but it probably simply have another name. Have tried to finde it via. xev, but it returns another key number.
Hope somebody are able to help me out with a solution... seems like a simple problem, but I have allready used 2-3 hours on it! :(
Best regards
Tobias
daou
May 31st, 2007, 10:35 AM
Btnx worked out of the box, which was a great relief after being use to useing the old complicated way - so thank you very much :smile:
Well there is one thing that I can't seem to figure out. I'm use to useing the windows key (Super key), as my beryl shortcut. And since my I uses my mouse to the same shorthcut i would be nice to assign a button to let say windowskey+ left... But where is the key, can't seem to find it in the event file... but it probably simply have another name. Have tried to finde it via. xev, but it returns another key number.
Hope somebody are able to help me out with a solution... seems like a simple problem, but I have allready used 2-3 hours on it! :sad:
No problem. I'm glad I didn't spend the time coding this application for general use for nothing. Actually, about 90% of the program is just so other people can use it and configure it without editing source code ;).
The key you are looking for, the Start (or Super, or Windows, etc) is KEY_LEFTMETA
For some reason, the Gnome keyboard shortcuts tool doesn't recognize it as a modifier key (meaning you can only use it by itself, not as a combination with another key). But in Beryl it should work.
Depressed Man
May 31st, 2007, 12:53 PM
The string doesn't seem to work for me.. after I type it in it asks me for my password which I type in. After a while it brings me back to the $ for its next command. It doesn't load gedit or do anything else. And if I type in gedit /etc/btnx/btnx_config after that it's still read only.
daou
May 31st, 2007, 01:27 PM
The string doesn't seem to work for me.. after I type it in it asks me for my password which I type in. After a while it brings me back to the $ for its next command. It doesn't load gedit or do anything else. And if I type in gedit /etc/btnx/btnx_config after that it's still read only.
Are you sure you have root privileges on the computer? It's your computer, right?
If you are having trouble with gedit try it with nano
sudo nano /etc/btnx/btnx_config
Ctrl-O saves the file, Ctrl-X quits
Depressed Man
May 31st, 2007, 01:57 PM
Yeah, it's my laptop. Though I did install Feisty Fawn using Wubi thru Vista..so that may cause some unknown problems. Nano works though! Thanks.
RVDowning
May 31st, 2007, 03:14 PM
I use Mandriva Spring 2007.1 and am interested in giving btnx a try. Obviously I don't have build-essential available. Just wondering what I might be able to use instead. Would gcc allow me to compile?
Depressed Man
May 31st, 2007, 03:59 PM
No problem. I'm glad I didn't spend the time coding this application for general use for nothing. Actually, about 90% of the program is just so other people can use it and configure it without editing source code ;).
The key you are looking for, the Start (or Super, or Windows, etc) is KEY_LEFTMETA
For some reason, the Gnome keyboard shortcuts tool doesn't recognize it as a modifier key (meaning you can only use it by itself, not as a combination with another key). But in Beryl it should work.
I'm trying to modify the zoom in and out buttons on my VX mouse to zoom in and out with Beryl. It usually involves the super key and the scroll wheel. How would I replicate the scrollwheel part?
daou
May 31st, 2007, 04:19 PM
I use Mandriva Spring 2007.1 and am interested in giving btnx a try. Obviously I don't have build-essential available. Just wondering what I might be able to use instead. Would gcc allow me to compile?
Yes gcc should be enough. The only restrictions I can think of that apply to other distros are:
uinput (if the modprobe command doesn't work, the module might have to be compiled)
/proc/bus/input/devices file location. Although I would suspect it is the same for all Linux distros.
event file location /dev/input, same as aboveThe bigger problem is update-rc.d utility. It is a Debian utility also used by Ubuntu to register init scripts. btnx uses an init script to autostart at boot. The install script in scripts/install.sh uses update-rc.d. I'm not sure if Mandriva has this.
You can try installing btnx, and if it fails at the update-rc.d commands, you can comment out the lines that use them from the install.sh and uninstall.sh script files. Then try installing it again. Then run ./btnx as root and check if it works.
For the autostart ability you have to ask around the Mandriva forums.
Tell me what happens.
daou
May 31st, 2007, 04:29 PM
I'm trying to modify the zoom in and out buttons on my VX mouse to zoom in and out with Beryl. It usually involves the super key and the scroll wheel. How would I replicate the scrollwheel part?
This isn't possible at the moment. However, I know what needs to be done to the program for it to be possible. I'll try getting that functionality working some time in the near future.
RVDowning
May 31st, 2007, 06:13 PM
I did have to comment out references to update-rc.d in install.sh and uninstall.sh.
A make install gives me:
chmod a+rx ./scripts/install.sh
./scripts/install.sh
Installing...........
btnx successfully installed. Starting btnx.
/etc/init.d/btnx: line 34: /lib/init/vars.sh: No such file or directory
make: *** [install] Error 1
I looked through files, but I don't see where vars.sh gets created and placed at /lib/init. Not sure if I can do anything about this or not.
If I try to execute with "./btnx" (without the quotes) I get:
Error opening the uinput device.
Make sure you have loaded the uinput module (modprobe uinput): No such file or directory
However, an lsmod shows me:
Module Size Used by
uinput 7744 0
Do I need to reboot, or restart X? Confused at the moment. Thanks for your help.
blazoner
May 31st, 2007, 06:21 PM
Hopefully one of the event files is outputting your mouse events, otherwise there is a bigger problem.
Well, looks like I've got that bigger problem you were talking about, but my MX 600 mouse is working fairly well with evdev. The only mouse events that actually show any output are the forward and back thumb-buttons that are set up to output ALT+LEFT and ALT+RIGHT. These output the keystrokes themselves, in almost every event.
I followed THIS THREAD (http://ubuntuforums.org/showthread.php?t=219894&highlight=logitech) for my mouse setup, but ended up doing things differently, only loosely following the guide. I'll go back through, and try to retrace what I did, so I can locate what I need.
Bedpan.ca
May 31st, 2007, 11:29 PM
Having a couple problems with btnx:
I was just wondering why the left and right tilt scroll buttons repeat themselves when you hold them in.
Also, if I move my thumb button, and then (without releasing it) press it in my cube (Beryl) goes into its rotate mode.
And... trying to change my search button to something other than default, and regardless of what i try in the settings, my kde search applet (kfind) still runs, and whatever I set in the config file only runs once.
Ideas?
blazoner
May 31st, 2007, 11:50 PM
I was just wondering why the left and right tilt scroll buttons repeat themselves when you hold them in.
This is a hardware feature, not something that will readily change behavior through software. And since the button-press is a type 1 event, you don't get a separate release signal, so you can't determine if the button is being held, but it repeats the original signal as if the button were pressed multiple times.
blazoner
May 31st, 2007, 11:58 PM
I finally got the output from my MX 600 laser mouse. I had to run the hexdump off of the live CD.
Here's the gory details:
Logitech MX 600
Running off of FF 7.04 Live CD
(This may contain settings from my underlying install, I don't know.)
From my devices_output file
I: Bus=0003 Vendor=046d Product=c50e Version=0111
N: Name="Logitech USB RECEIVER"
P: Phys=usb-0000:00:03.0-1/input0
S: Sysfs=/class/input/input1
H: Handlers=mouse1 ts1 event1
B: EV=20007
B: KEY=ffff0000 0 0 0 0 0 0 0 0
B: REL=143
B: LED=ff00
Left-Click
0000000 89da 465f 4f5d 0003 0001 0110 0001 0000 Press
0000010 89da 465f 4f77 0003 0000 0000 0000 0000
0000020 89da 465f df48 0005 0001 0110 0000 0000 Release
0000030 89da 465f df63 0005 0000 0000 0000 0000
Right-Click
0000000 8c28 465f 03a5 0009 0001 0111 0001 0000 Press
0000010 8c28 465f 03bc 0009 0000 0000 0000 0000
0000020 8c28 465f 16e8 000b 0001 0111 0000 0000 Release
0000030 8c28 465f 1701 000b 0000 0000 0000 0000
Scroll-Click
0000000 8c92 465f 1026 000c 0001 0112 0001 0000 Press
0000010 8c92 465f 1040 000c 0000 0000 0000 0000
0000020 8c92 465f 1d66 000f 0001 0112 0000 0000 Release
0000030 8c92 465f 1d81 000f 0000 0000 0000 0000
Scroll-Up
0000000 8cdf 465f 7f5a 0009 0002 0008 0001 0000 Press
0000010 8cdf 465f 7f75 0009 0000 0000 0000 0000
Scroll-Down
0000000 8d30 465f d082 000b 0002 0008 ffff ffff Press
0000010 8d30 465f d09c 000b 0000 0000 0000 0000
(I have no idea why the sideways scroll has generated 6 lines of code per button press, but there's only the single press event, then it automatically repeats.)
Scroll-Left
0000000 8db6 465f 95cc 0005 0001 0116 0001 0000 Press
0000010 8db6 465f 95e7 0005 0000 0000 0000 0000
0000020 8db6 465f d454 0005 0002 0006 ffff ffff
0000030 8db6 465f d46a 0005 0000 0000 0000 0000
0000040 8db6 465f 454c 0008 0001 0116 0000 0000
0000050 8db6 465f 4563 0008 0000 0000 0000 0000
Scroll-Right
0000000 8e2a 465f 35f6 0000 0001 0117 0001 0000 Press
0000010 8e2a 465f 360a 0000 0000 0000 0000 0000
0000020 8e2a 465f 747a 0000 0002 0006 0001 0000
0000030 8e2a 465f 7491 0000 0000 0000 0000 0000
0000040 8e2a 465f a0f5 0003 0001 0117 0000 0000
0000050 8e2a 465f a108 0003 0000 0000 0000 0000
Thumb-Forward
0000000 8e80 465f 6452 000d 0001 0114 0001 0000 Press
0000010 8e80 465f 646e 000d 0000 0000 0000 0000
0000020 8e81 465f 1612 0000 0001 0114 0000 0000 Release
0000030 8e81 465f 162c 0000 0000 0000 0000 0000
Thumb-Rear
0000000 8ec5 465f ecd2 000b 0001 0113 0001 0000 Press
0000010 8ec5 465f ecf2 000b 0000 0000 0000 0000
0000020 8ec5 465f 3e90 000e 0001 0113 0000 0000 Release
0000030 8ec5 465f 3eae 000e 0000 0000 0000 0000
Zoom +
0000000 8f02 465f 2867 0002 0001 0118 0001 0000 Press
0000010 8f02 465f 2872 0002 0000 0000 0000 0000
0000020 8f02 465f 5ae7 0004 0001 0118 0000 0000 Release
0000030 8f02 465f 5af2 0004 0000 0000 0000 0000
Zoom -
0000000 8f4f 465f fc97 0003 0001 0119 0001 0000 Press
0000010 8f4f 465f fca2 0003 0000 0000 0000 0000
0000020 8f4f 465f ac17 0006 0001 0119 0000 0000 Release
0000030 8f4f 465f ac23 0006 0000 0000 0000 0000
Zoom 100%
0000000 8f88 465f d825 0009 0001 0115 0001 0000 Press
0000010 8f88 465f d83e 0009 0000 0000 0000 0000
0000020 8f88 465f 4920 000c 0001 0115 0000 0000 Release
0000030 8f88 465f 4939 000c 0000 0000 0000 0000
Xenner
June 1st, 2007, 12:08 AM
when i use the top thumbutton for forward in firefox, it goes forward, but also left clicks, which is quite odd.
any ideas?
daou
June 1st, 2007, 01:59 AM
/etc/init.d/btnx: line 34: /lib/init/vars.sh: No such file or directory
make: *** [install] Error 1
I looked through files, but I don't see where vars.sh gets created and placed at /lib/init. Not sure if I can do anything about this or not.
If I try to execute with "./btnx" (without the quotes) I get:
Error opening the uinput device.
Make sure you have loaded the uinput module (modprobe uinput): No such file or directory
However, an lsmod shows me:
Module Size Used by
uinput 7744 0
Do I need to reboot, or restart X? Confused at the moment. Thanks for your help.
The first part about vars.sh is no problem. Its trying to launch the init script. You could comment out the parts "/etc/init.d/btnx stop|start" to suppress the error but its not necessary.
The uinput problem needs code changes. Apparently your system uses a different path for the uinput module file, and this means its probably different for the event files as well. In the next update (probably coming in a day or so), I'll fix the necessary parts so the program looks for uinput and the event file in more distro specific locations.
daou
June 1st, 2007, 02:00 AM
Originally Posted by Bedpan.ca http://ubuntuforums.org/images/uf/buttons/viewpost.gif (http://ubuntuforums.org/showthread.php?p=2759100#post2759100)
I was just wondering why the left and right tilt scroll buttons repeat themselves when you hold them in.
This is a hardware feature, not something that will readily change behavior through software. And since the button-press is a type 1 event, you don't get a separate release signal, so you can't determine if the button is being held, but it repeats the original signal as if the button were pressed multiple times.
Thats exactly right. The repeat delay should be long enough so it won't be a problem.
daou
June 1st, 2007, 04:01 AM
I finally got the output from my MX 600 laser mouse. I had to run the hexdump off of the live CD.
Here's the gory details:
Excellent. Thanks for taking the time. I will include MX-600 support in the next update.
You mentioned you were using evdev and other possible hacks for the MX600? This could interfere with btnx (especially if the event file isn't getting any input from the mouse). You should probably try to get the mouse to as much of a default state as possible.
daou
June 1st, 2007, 04:07 AM
when i use the top thumbutton for forward in firefox, it goes forward, but also left clicks, which is quite odd.
any ideas?
Have you used any other methods or howtos to try to get additional functionality from the mouse? This will have the effect of sending extra unwanted events.
Also, you can post your configuration for that button so I can check it.
Akegata
June 1st, 2007, 04:23 AM
Wow, this really kicks ***. I set up my mx revolution with the old configuration method before. It worked, but it took a pretty long time to get it like I wanted it to.
Now I just installed btnx and switched the back/forward button functionality with the top scroll wheel functionality, and everything is like I want it to be. Really nice!
There is one problem though. When I press the forward button, it does indeed to the right action, but it also makes a menu show. The same menu you get if you right-click on the title bar of a window. What's up with that?
Here's the conf for that button:
# Thumb button back.
# Does an Alt+Left. Ex. Firefox forward
Button
rawcode = 0x01011300
type = 0
keycode = KEY_LEFT
mod1 = KEY_LEFTALT
EndButton
Edit: I just noticed someone else is having almost the same problem. Well, at least I provided the config. :)
daou
June 1st, 2007, 04:38 AM
Wow, this really kicks ***. I set up my mx revolution with the old configuration method before. It worked, but it took a pretty long time to get it like I wanted it to.
Now I just installed btnx and switched the back/forward button functionality with the top scroll wheel functionality, and everything is like I want it to be. Really nice!
There is one problem though. When I press the forward button, it does indeed to the right action, but it also makes a menu show. The same menu you get if you right-click on the title bar of a window. What's up with that?
I'm glad you like it. I'm not getting this problem on my MX Revolution. Is your mouse still configured according to the MX Revolution howto?
Akegata
June 1st, 2007, 05:36 AM
I'm glad you like it. I'm not getting this problem on my MX Revolution. Is your mouse still configured according to the MX Revolution howto?
Nope. I reinstalled ubuntu from scratch (my hdd died), so the only thing I have done mouse configuration wise is to install btnx.
It seems like ubuntu maps the thumb buttons by itself. I get the same behaviour from them (except the back/forward functionality) when I turn off btnx.
How can I turn this off? I can't seem to find any settings anywhere controlling this.
Curlydave
June 1st, 2007, 08:41 AM
Daou, this is an absolutely fantastic program that should be included with Ubuntu. It's straightforward and easy to do, and makes my MXrev fully functional. You even got the side scroller to change views in Beryl. Before I only had mouse 1 and 2 working. Ubuntu devs: I hope you're reading this.
I was going to do it the long way from the old MX rev thread, but that type of thing usually gives me slews of errors, so I decided to wait on this when I saw your post announcing it. (Every console command i make in Linux has a ~20% of giving me an error, so something with a bunch of confusing commands was definitely going to mess things up) Glad I made that decision. :)
Setting the search button to middle click by default was a great touch; that's what I have it set to in windows. I think I had to use the uberoptions hack to make that work.
One issue though:
Wow, this really kicks ***. I set up my mx revolution with the old configuration method before. It worked, but it took a pretty long time to get it like I wanted it to.
Now I just installed btnx and switched the back/forward button functionality with the top scroll wheel functionality, and everything is like I want it to be. Really nice!
There is one problem though. When I press the forward button, it does indeed to the right action, but it also makes a menu show. The same menu you get if you right-click on the title bar of a window. What's up with that?
Here's the conf for that button:
# Thumb button back.
# Does an Alt+Left. Ex. Firefox forward
Button
rawcode = 0x01011300
type = 0
keycode = KEY_LEFT
mod1 = KEY_LEFTALT
EndButton
Edit: I just noticed someone else is having almost the same problem. Well, at least I provided the config. :)
I am having the same issue, only they're doing a middle click instead. I'm setting the back and forward thumb buttons to go forward and back in firefox like it does in Windows the way Akegata set it up above, but instead they both middle click instead of doing what they're supposed to or what Ake's does. Weird that we're having different problems doing the same thing. I should note that by default they function properly, but I don't like the default setting.
edit: now that I look at it, I want to say that both of my key commands for it were under mod 1 and 2, not keycode. I'm not at my normal computer right now so I can't check, but that might have something to do with it.
RVDowning
June 1st, 2007, 08:44 AM
The first part about vars.sh is no problem. Its trying to launch the init script. You could comment out the parts "/etc/init.d/btnx stop|start" to suppress the error but its not necessary.
The uinput problem needs code changes. Apparently your system uses a different path for the uinput module file, and this means its probably different for the event files as well.
Let me know if there is any info about Mandriva (2007.1) that I can supply.
In the next update (probably coming in a day or so), I'll fix the necessary parts so the program looks for uinput and the event file in more distro specific locations.
Waiting with baited breath. :)
daou
June 1st, 2007, 10:11 AM
EDIT: doesn't work
To anyone having problems with extra buttons events (especially with the MX Revo, for example a right, middle, or left mouse button event when using the thumb buttons):
This might be a fix. I can't confirm it because I don't have the problem myself and can't replicate it (despite trying very hard to abuse btnx ;)).
Try changing the mappings of the buttons with xmodmap
For example run something like this:
$ xmodmap -e "pointer = 1 2 3 4 5 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6"This should switch any buttons, like thumb buttons (8 and 9) on the MX Revo to higher values which are not handled.
If that works, add the line, or whatever line worked for you, into your .Xmodmap file:
$ echo "pointer = 1 2 3 4 5 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6" > ~/.XmodmapIf this turns out to fix the problem, then perhaps it should be included as a command in the install script.
Akegata
June 1st, 2007, 10:52 AM
To anyone having problems with extra buttons events (especially with the MX Revo, for example a right, middle, or left mouse button event when using the thumb buttons):
This might be a fix. I can't confirm it because I don't have the problem myself and can't replicate it (despite trying very hard to abuse btnx ;)).
Try changing the mappings of the buttons with xmodmap
For example run something like this:
$ xmodmap -e "pointer = 1 2 3 4 5 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6"This should switch any buttons, like thumb buttons (8 and 9) on the MX Revo to higher values which are not handled.
If that works, add the line, or whatever line worked for you, into your .Xmodmap file:
$ echo "pointer = 1 2 3 4 5 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6" > ~/.XmodmapIf this turns out to fix the problem, then perhaps it should be included as a command in the install script.
That doesn't really seem to do anything.
I get the warning message "Warning: Only changing the first 20 of 9 buttons." when I run it, and nothing changes. :/
Xenner
June 1st, 2007, 11:10 AM
did not work for me either
daou
June 1st, 2007, 11:15 AM
That doesn't really seem to do anything.Ok, I can only think of one more thing. What does your xorg.conf InputSection look like?
$ sudo gedit /etc/X11/xorg.confThis is what mine looks like:
Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
Option "Buttons" "3"
EndSection
EDIT: "Protocol" "auto" and Driver "mouse" are important.
Akegata
June 1st, 2007, 11:25 AM
This is what my InputDevice-section looks like:
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "true"
EndSection
I tried adding the buttons 3 line, but that didn't hchange anything.
daou
June 1st, 2007, 11:36 AM
I tried adding the buttons 3 line, but that didn't hchange anything.
You restarted X, right (Ctrl+Alt+Backspace)?
Try making the InputSection more like mine. Make a backup first. If you don't know what to do if X fails, ask me first before making changes. Change the following parts:
Protocol
Device
Emulate3Buttons
Device (maybe try this after trying everything else)
Take out CorePointer
Xenner
June 1st, 2007, 11:43 AM
You restarted X, right (Ctrl+Alt+Backspace)?
Try making the InputSection more like mine. Make a backup first. If you don't know what to do if X fails, ask me first before making changes. Change the following parts:
Protocol
Device
Emulate3Buttons
Device (maybe try this after trying everything else)
Take out CorePointer
I change my xorg as you stated and it works great for me now ;)
I have also setup revoco for the mx revolution and my middle mouse wheel works perfectly :)
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
daou
June 1st, 2007, 12:26 PM
I change my xorg as you stated and it works great for me now :wink:
I have also setup revoco for the mx revolution and my middle mouse wheel works perfectly :smile:Great! Only problem is, that it looks like MX users have to edit their xorg.conf after all... I wanted to avoid this as much as possible. Perhaps I could try to include some sort of functionality in the install scripts to detect an MX Revo and modify the xorg.conf file accordingly... this wouldn't be easy and I don't really like messing around with other peoples' xorg.conf files.
One more thing. I would be really grateful if some MX Revo user has the time to isolate the xorg.conf option that is the culprit here.
EDIT: is it the "Protocol" "auto" option?
Akegata
June 1st, 2007, 12:40 PM
EDIT: is it the "Protocol" "auto" option?
Yeah, you nailed it. I only changed the Protocol to "auto", now it works like it should.
Thank you!
Xenner
June 1st, 2007, 12:53 PM
even though changing it to auto is still messing with an xorg config, i think that would still fly for the mx revo users, i would just post a warning.
daou
June 1st, 2007, 12:54 PM
Yeah, you nailed it. I only changed the Protocol to "auto", now it works like it should.
Thank you!No problem. I'll add this to the howto when I release 0.2.6 (about 30 mins :D).
Daou, this is an absolutely fantastic program that should be included with Ubuntu. It's straightforward and easy to do, and makes my MXrev fully functional. You even got the side scroller to change views in Beryl. Before I only had mouse 1 and 2 working. Ubuntu devs: I hope you're reading this.
I was going to do it the long way from the old MX rev thread, but that type of thing usually gives me slews of errors, so I decided to wait on this when I saw your post announcing it. (Every console command i make in Linux has a ~20% of giving me an error, so something with a bunch of confusing commands was definitely going to mess things up) Glad I made that decision. :smile:
Setting the search button to middle click by default was a great touch; that's what I have it set to in windows. I think I had to use the uberoptions hack to make that work.:D:D What's funny is that I never went through the howto to get my MX Revo working on Feisty. I thought it would be almost easier just coding the program, rather than doing all the endless steps in the howto ;). And it almost was (at least it was more fun). The old howto did what it promised, but so does banging your head against the wall.
I'm glad you think it's Ubuntu worthy material. I certainly wouldn't mind if someone did include it.
Xenner
June 1st, 2007, 01:05 PM
only thing i would add is somehow make an option to see which buttons control what, it might be a little complicated to make user friendly.
personally i changed the scroll wheel left right to changing tabes and the thumb buttons to back and forward in firefox. Default in windows atleast the thumb buttons are for forward and backward in firefox, so i am used to that, some people might agree, but either way it is alot more user friendly with the option to do that somehow without editing the config file.
daou
June 1st, 2007, 01:26 PM
btnx-0.2.6 has been released. If you are upgrading, check the upgrade note in the installation instructions. Additions include:
Support for MX-600. Big thanks to blazoner for doing the hexdumping (on a LiveCD:D).
Ability to generate mousewheel events (keycode = REL_WHEELFORWARD or REL_WHEELBACK)
Some changes so btnx might work with other distros. It looks for the uinput and event handlers in a couple of different locations. New install and uninstall scripts for generic distro users (use "make install-generic" and "make uninstall-generic" as root).
RVDowning
June 1st, 2007, 01:31 PM
I'll give it a try and report back as soon as I get home from work. Looking forward to it. :)
daou
June 1st, 2007, 01:37 PM
I'll give it a try and report back as soon as I get home from work. Looking forward to it. :smile:
btnx automatically looks for uinput and the event handlers in the following directories:
/dev
/dev/input (this is where they are for Ubuntu)
/dev/miscIf it turns out that none of those work, modprobe uinput first then use find to locate it (might need root privs):
$ find /dev -name *uinput*
And then tell me where it is so I can update the list btnx searches.
Curlydave
June 1st, 2007, 01:39 PM
btnx-0.2.6 has been released. Additions include:
Support for MX-600
Ability to generate mousewheel events (keycode = REL_WHEELFORWARD or REL_WHEELBACK)
Some changes so btnx might work with other distros. It looks for the uinput and event handlers in a couple of different locations. New install and uninstall scripts for generic distro users (use "make install-generic" and "make uninstall-generic" as root).
Will install. To install over the old vesion, can you just do the same install procedure as before, or do you need to uninstall the old one first? Will it alter the config file?
daou
June 1st, 2007, 01:40 PM
blazoner,
If your MX-600 doesn't work because you couldn't get any output from the event files, try hexdumping all the files in the following directories:
/dev/input/by-id
/dev/input/by-path
daou
June 1st, 2007, 01:43 PM
Will install. To install over the old vesion, can you just do the same install procedure as before, or do you need to uninstall the old one first? Will it alter the config file?Make a backup! The old btnx_config file always gets cleaned up after installing. You should be able to install without uninstalling.
The reason the old config file gets removed, is if you change mice and install it again, it won't copy the new default_config file as the new config. This means, autodetection fails.
Good thing you reminded me about that. Otherwise there would be a couple angry users trolling the thread ;).
Curlydave
June 1st, 2007, 01:51 PM
Make a backup! The old btnx_config file always gets cleaned up after installing. You should be able to install without uninstalling.
The reason the old config file gets removed, is if you change mice and install it again, it won't copy the new default_config file as the new config. This means, autodetection fails.
Good thing you reminded me about that. Otherwise there would be a couple angry users trolling the thread ;).
Gotcha.
This is a really straight-forward and useful utility; thanks for making it. Something like this really should have been included by default in Ubuntu a while ago.
Also, it's kind of weird how Logitech didn't include a default button for mouse3, which is now pretty standard in Windows and Linux OS and programs. The wheel click changes scroll types and the button below it does some useless search function. Mouse3 is a much more useful function.
daou
June 1st, 2007, 01:59 PM
Gotcha.
This is a really straight-forward and useful utility; thanks for making it. Something like this really should have been included by default in Ubuntu a while ago.
True. But Ubuntu is still in its infancy compared to other OS's. What's important is that we help make it better.
Also, it's kind of weird how Logitech didn't include a default button for mouse3, which is now pretty standard in Windows and Linux OS and programs. The wheel click changes scroll types and the button below it does some useless search function. Mouse3 is a much more useful function.
Yes, I wondered about this as well. It was probably a trade-off between easy scroll-mode changes and the mouse wheel button functionality. I don't use the incremental scroll at all anymore, mostly because I haven't played games in a while. It is useful for FPS gamers, especially, because the mouse is usually flying across the table and the wheel has a tendency to turn by itself then. It's not nice when you are aiming at someone with a rifle and have it replaced by a knife all of a sudden :D.
Xenner
June 1st, 2007, 02:03 PM
is it possible to also create a script to install revoco with this utility? it would make install of mx revolution ALOT easier for newer users who want middle click-to-click functionality
Xenner
June 1st, 2007, 02:07 PM
also i am having a problem when i use the thumb buttons it goes actually does the action twice...
daou
June 1st, 2007, 02:14 PM
also i am having a problem when i use the thumb buttons it goes actually does the action twice...
Sounds like a problem someone had before. Make sure the type value for the thumb buttons is type=0
I hope I didn't break anything in the new update :-\". The changes were pretty big in some areas.
is it possible to also create a script to install revoco with this utility? it would make install of mx revolution ALOT easier for newer users who want middle click-to-click functionality
I haven't had the chance to try revoco out. But yes, if revoco doesn't interfere with btnx, the install script could prompt the user whether he would like to install revoco. It could then fetch it and install it. I'll think about this.
Xenner
June 1st, 2007, 02:28 PM
Sounds like a problem someone had before. Make sure the type value for the thumb buttons is type=0
I hope I didn't break anything in the new update :-\". The changes were pretty big in some areas.
Worked thanks, i have not tried the new version yet, no updates that affect my seutp
I haven't had the chance to try revoco out. But yes, if revoco doesn't interfere with btnx, the install script could prompt the user whether he would like to install revoco. It could then fetch it and install it. I'll think about this.
i have them both working side by side and they do not interfere. Once i compiled revoco i just placed it in my /usr/lib/bin then added "revoco click" to my /etc/rc.local file, so every time it starts up, my wheel is locked into click-to-click mode
blazoner
June 1st, 2007, 02:34 PM
Question:
How individual are the button presses? Are they unique?
Question 2:
Any progress on getting the Meta keys to act as modifiers?
Question 3:
How about the ability to call scripts directly (without having to map them to a keyboard button)?
Question 4:
How about adding an optional type 2 which sends an event on press, and a type 3 which sends an event on release?
A note on the MX 600, I am getting a response on pressing the 100% button as if it is only sending a BTN_LEFT event instead of BTN_LEFT + KEY_LEFTALT. Everything else is working great.
blazoner
June 1st, 2007, 02:45 PM
Another thought:
What about making the install script compare btnx_config files to the defaults, and if there is no match, make a backup with the name of the mouse that the old config is for? i.e. old_btnx_config_mxrevolution or btnx_config_mxrevolution_backup
blazoner
June 1st, 2007, 03:01 PM
OK, one more, and I'll shut up for a bit:
On install, look for old_btnx_config_mxrevolution or btnx_config_mxrevolution_backup and if it exists, copy it as btnx_config rather than the default, unless there have been significant formatting changes.
thelocust
June 1st, 2007, 03:48 PM
I have no functionality for my MX Revolution at all. When I installed btnx I was under the impression that it would automatically detect and setup my mouse. Is there something I need to do to get the MX working before btnx will work? Thanks.
daou
June 1st, 2007, 04:16 PM
Question:
How individual are the button presses? Are they unique?If you are asking whether the rawcodes change for different mice, then the answer is yes and no. Some buttons are same on all mice, like left+right click and wheel scrolls. The extra buttons usually share some codes, but each mouse usually has its own set. For example, a button on the MX Revo might have the same rawcode as on the MX-600, but others could be different. So, in order to make it easier for users to edit the button functionality, I need the hexdumps and info on which button gave the rawcode for that button.
I thought of making a configuration for generic mice. This would mean that the config file would have all the possible rawcodes, and the user would then test and see which code matched which button, and which ones do not apply at all. However, I gave up on this because it defeats the purpose of btnx: to make it easy to configure and install.
Also, if users mix and match and do not report back to me what codes applied to which buttons on their mice, everyone with that mouse would do the same work over and over again. The community would not benefit defeating another purpose of btnx. That is why I decided against it.
If you are interested, the actual value I'm looking for in the hexdumps is bolded below:
Example: the thumb-forward button of MX-600
0000000 8e80 465f 6452 000d 0001 0114 0001 0000 Press
0000010 8e80 465f 646e 000d 0000 0000 0000 0000
0000020 8e81 465f 1612 0000 0001 0114 0000 0000 Release
0000030 8e81 465f 162c 0000 0000 0000 0000 0000Actually the last byte signals whether the button is pressed or not, but it is not included in the rawcode. This is because I want to deal with them as 32-bit integers and there would be a unique event code for a press and release event. The pressed byte is handled separately in the code.
The 16-bit word "0114" is actually the event code that the input system uses. If you look in the /etc/btnx/events file, this translates to a BTN_EXTRA.
I hope I didn't bore you too much with the details.
Question 2:
Any progress on getting the Meta keys to act as modifiers?If you are referring to the Super (Start) and Menu keys, they are KEY_LEFTMETA and KEY_RIGHTMETA and should be functional. If not, could you please elaborate.
Question 3:
How about the ability to call scripts directly (without having to map them to a keyboard button)?I thought of this a couple of days ago. I'm a bit unsure whether this should be done. If I get bored, I'll code it in.
Question 4:
How about adding an optional type 2 which sends an event on press, and a type 3 which sends an event on release?Perhaps. But as you've seen, people might run into trouble when they change the type values. It could be added for "powerusers" and discouraged even more for people who do know what they are for.
What about making the install script compare btnx_config files to the defaults, and if there is no match, make a backup with the name of the mouse that the old config is for? i.e. old_btnx_config_mxrevolution or btnx_config_mxrevolution_backup
OK, one more, and I'll shut up for a bit:
On install, look for old_btnx_config_mxrevolution or btnx_config_mxrevolution_backup and if it exists, copy it as btnx_config rather than the default, unless there have been significant formatting changes.Don't worry, I enjoy getting feedback. I would have been content with the first version that was compatible with just the MX Revolution if it weren't for people giving ideas. And it sounds like you have some great ideas.
Yes, I definitely think there should be an automatic backup mechanism for the script. It could just as well be simple "rename if exists" command. Then the user would just have to copy it over the default one after upgrading. Will be added in the next release.
Oh, and if it looks like I've forgotten to add something that I've promised here, bug me about it. I usually have to scour this thread looking for things I've said I would do before an update so something could easily be missed and forgotten.
daou
June 1st, 2007, 04:18 PM
I have no functionality for my MX Revolution at all. When I installed btnx I was under the impression that it would automatically detect and setup my mouse. Is there something I need to do to get the MX working before btnx will work? Thanks.What version of Ubuntu are you using? Have you changed any of the default configurations for your mouse (i.e. done the MX Revo howto or some other mouse howto)?
And try running btnx with
$ sudo ./btnx
in the directory where you ran the "sudo make install" command. Paste the output of the program here.
thelocust
June 1st, 2007, 04:44 PM
I am running Kubuntu Feisty and the only thing I have done to any mouse configurations were your instructions at the beginning of this thread. This is my output when starting up btnx:
bob@tuxbox:~$ sudo ./btnx-0.2.5/btnx
Password:
No startup errors
I think I would need to do something in my xorg.conf file to recognize my mouse. Also I have another mouse plugged in could that be interfering. Thanks for the reply.
daou
June 1st, 2007, 05:01 PM
I am running Kubuntu Feisty and the only thing I have done to any mouse configurations were your instructions at the beginning of this thread. This is my output when starting up btnx:
Code:
bob@tuxbox:~$ sudo ./btnx-0.2.5/btnx
Password:
No startup errors
I think I would need to do something in my xorg.conf file to recognize my mouse. Also I have another mouse plugged in could that be interfering. Thanks for the reply.
I would suspect that the other mouse is interfering. You should upgrade to 0.2.6 because it will give you more detailed output about what is going on.
Also, have a look at this page (http://ubuntuforums.org/showthread.php?t=455656&page=6) of the thread. There is some discussion about what the xorg.conf InputSection should look like.
daou
June 1st, 2007, 05:05 PM
If you get 0.2.6, it will tell you which event handler it is using. You can check that it's trying to use the correct one by first giving this command:
cat /proc/bus/input/devices | grep Product=c51a -A 6
It will list the device section for the MX Revo. Look at the Handler line. It should be something like "Handlers=mouseX eventX". Make sure the event is the same one as reported by btnx.
thelocust
June 1st, 2007, 05:36 PM
X wont start up right without the other mouse plugged in. (p.s. your link for the xorg.conf info takes me back to this page.)
thelocust
June 1st, 2007, 05:48 PM
I ran the original install instructions from terminal mode and installed 2.6. My output for the cat /proc/bus/input/devices | grep Product=c51a -A 6 command shows 2 Logitech inputs, I don't know how to check what btnx is reporting. Also if I don't have the other mouse plugged in Xorg loads a default xorg.conf file.
RVDowning
June 1st, 2007, 07:12 PM
Well, not much luck I'm afraid. I get a clean compile, modprobe uinput, and do a ./btnx, but after doing that I have no mouse functionality that I didn't have before. Perhaps I'll have to try revoco so I'll at least have some additional functionality with this mx revolution. btnx must offer ubuntu specific functionality.
daou
June 1st, 2007, 08:04 PM
RVDowning and the locust: post the results of running btnx-0.2.6
in Ubuntu (if running in the same directory as where you extracted btnx):
$ sudo /etc/init.d/btnx stop
sudo ./btnxin Mandriva (if running in the same directory as where you extracted btnx)
# ./btnxThis is what mine outputs:
$ sudo ./btnx
Detected mouse: mxrevo Vendor=046d Product=c51a
Device and event handler detection complete.
-Using event: event3
Opened handler: /dev/input/event3
Opened handler: /dev/input/event4
Opened handler: /dev/input/uinput
Opened handler: /dev/input/uinput
No startup errors
It detects an MX Revo with the correct Vendor and product IDs, uses event handler "event3" (and 4), opens uinput and starts working. The event number should be the same as the one reported by "cat /proc/bus/input/devices" in the MX Revo handler section. MXRevo has 2 event handlers, one being only for the search key.
And both of you, try to modprobe evdev, then start again. It should be on by default in Ubuntu.
thelocust: can you post your xorg.conf "InputDevice" section(s)?
RVDowning
June 1st, 2007, 08:24 PM
From ./btnx
[root@localhost btnx-0.2.6]# ./btnx
Detected mouse: mxrevo Vendor=046d Product=c51a
Device and event handler detection complete.
-Using event: event1
Opened handler: /dev/input/event1
Opened handler: /dev/input/event2
Opened handler: /dev/uinput
Opened handler: /dev/uinput
No startup errors
From cat /proc/bus/input/devices
I: Bus=0003 Vendor=046d Product=c51a Version=4101
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:02:0a.1-2/input0
S: Sysfs=/class/input/input1
H: Handlers=mouse0 event1 ts0
B: EV=7
B: KEY=ffff0000 0 0 0 0 0 0 0 0
B: REL=143
I: Bus=0003 Vendor=046d Product=c51a Version=4101
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:02:0a.1-2/input1
S: Sysfs=/class/input/input2
H: Handlers=kbd event2
B: EV=f
B: KEY=c0002 400 0 0 1 f80 78000 6639fa d84157ad 8e0000 0 0 0
B: REL=40
B: ABS=1 0
I had a delay. I had to restore xorg.conf from backup. I think I screwed it while trying to change it. So, I'll post the InputDevice sections here:
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "ExplorerPS/2"
Option "Device" "/dev/mouse"
EndSection
Section "InputDevice"
Identifier "Mouse2"
Driver "evdev"
Option "product" "0xc51a"
Option "vendor" "0x046d"
Option "HWheelRelativeAxisButtons" "7 6"
EndSection
Dritzen
June 1st, 2007, 09:00 PM
I can't seem to get btnx to recognize my mouse properly. I have a Logitech Revolution MX mouse and a Logitech G15 keyboard.
alex@host:~/btnx-0.2.6$ sudo ./btnx
Detected mouse: mxrevo Vendor=046d Product=c51a
Device and event handler detection complete.
-Using event: event3
Error opening button event file descriptor"event3": No such file or directory
alex@host:~/btnx-0.2.6$ sudo cat /dev/input/event3
cat: /dev/input/event3: No such file or directory
alex@host:~/btnx-0.2.6$ cat /proc/bus/input/devices | grep Product=c51a -A 6
I: Bus=0003 Vendor=046d Product=c51a Version=0111
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:1d.3-2/input0
S: Sysfs=/class/input/input3
H: Handlers=mouse1 ts1 event3
B: EV=7
B: KEY=ffff0000 0 0 0 0 0 0 0 0
--
I: Bus=0003 Vendor=046d Product=c51a Version=0111
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:1d.3-2/input1
S: Sysfs=/class/input/input4
H: Handlers=kbd event4
B: EV=f
B: KEY=7fff 2c3027 bf004440 0 0 1 f80 8807c000 667bfa d9415fed 8e0000 0 0 0
I copied my mouse config verbatim from earlier in this thread. Here it is:
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
I tried using: touch /dev/input/event3 and then running btnx
Here is the output:
alex@host:~/btnx-0.2.6$ sudo ./btnx
Detected mouse: mxrevo Vendor=046d Product=c51a
Device and event handler detection complete.
-Using event: event3
Opened handler: /dev/input/event3
Opened handler: /dev/input/event4
Opened handler: /dev/input/uinput
Opened handler: /dev/input/uinput
No startup errors
Segmentation fault (core dumped)
RVDowning
June 1st, 2007, 09:23 PM
Think I have success now. Issue seems to have been with my xorg.conf. I did get the "3C" and "3D" with a wheel left and wheel right in a shell console. Now to be about exploring. Thanks much for your help. :p
tim71
June 1st, 2007, 09:39 PM
This project seems to be exactly what I've been looking for.
I am using an "obsolete" (discontinued) MX1000 mouse and MX 518. However for some weird reason I did not succeed to get the hexdump from any other input devices than keyboard - only 'event1' gave the response when the keys on the keyboard are pressed - all other event handlers gave no results. Mouse functions normally, but has no hexdump output.
Not quite sure, where the problem is...
cat /proc/bus/input/devices output is here
I: Bus=0003 Vendor=046d Product=c50e Version=0111
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:02.0-1/input0
S: Sysfs=/class/input/input2
H: Handlers=mouse1 ts1 event2
B: EV=20007
B: KEY=ffff0000 0 0 0 0 0 0 0 0
B: REL=143
B: LED=ff00
and related part of Xorg.conf is here
Section "InputDevice"
Identifier "Logitech MX1000"
Driver "evdev"
Option "Name" "Logitech USB Receiver"
Option "Device" "/dev/input/event2"
Option "Resolution" "800"
Option "Emulate3Buttons" "no"
Option "ButtonNumber” “12"
Option "Buttons” “12"
Option "ButtonMapping” “1 2 3 8 9 10 11 12"
Option "ZAxisMapping” “4 5"
Option "XAxisMapping” “6 7"
EndSection
thelocust
June 2nd, 2007, 01:25 AM
Haha I'm a retard I didn't have the mouse synced with the receiver.
blazoner
June 2nd, 2007, 04:48 AM
This project seems to be exactly what I've been looking for.
I am using an "obsolete" (discontinued) MX1000 mouse and MX 518. However for some weird reason I did not succeed to get the hexdump from any other input devices than keyboard - only 'event1' gave the response when the keys on the keyboard are pressed - all other event handlers gave no results.
Not quite sure, where the problem is...
cat /proc/bus/input/devices output is here
I: Bus=0003 Vendor=046d Product=c50e Version=0111
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:02.0-1/input0
S: Sysfs=/class/input/input2
H: Handlers=mouse1 ts1 event2
B: EV=20007
B: KEY=ffff0000 0 0 0 0 0 0 0 0
B: REL=143
B: LED=ff00
and related part of Xorg.conf is here
Section "InputDevice"
Identifier "Logitech MX1000"
Driver "evdev"
Option "Name" "Logitech USB Receiver"
Option "Device" "/dev/input/event2"
Option "Resolution" "800"
Option "Emulate3Buttons" "no"
Option "ButtonNumber” “12"
Option "Buttons” “12"
Option "ButtonMapping” “1 2 3 8 9 10 11 12"
Option "ZAxisMapping” “4 5"
Option "XAxisMapping” “6 7"
EndSection
I had a similar problem trying to get a hexdump off of an MX 600. I finally booted off of a 7.04 live CD, went through the process, and it worked immediately.
blazoner
June 2nd, 2007, 05:18 AM
If you are referring to the Super (Start) and Menu keys, they are KEY_LEFTMETA and KEY_RIGHTMETA and should be functional. If not, could you please elaborate.
From post #28:The key you are looking for, the Start (or Super, or Windows, etc) is KEY_LEFTMETA
For some reason, the Gnome keyboard shortcuts tool doesn't recognize it as a modifier key (meaning you can only use it by itself, not as a combination with another key). But in Beryl it should work.
Yes, I definitely think there should be an automatic backup mechanism for the script. It could just as well be simple "rename if exists" command. Then the user would just have to copy it over the default one after upgrading. Will be added in the next release.
The problem I see with this approach is that if someone is trying different mouses, the third time they try the same mouse, it would overwrite the backup with a second backup.
daou
June 2nd, 2007, 05:58 AM
Think I have success now. Issue seems to have been with my xorg.conf. I did get the "3C" and "3D" with a wheel left and wheel right in a shell console. Now to be about exploring. Thanks much for your help. :razz:
I don't know what your xorg.conf looks like now, but looking at the old one, I think you should try to do the following (making a backup first):
Merge your InputSections into one input section.
Remove evdev as the driver, use something more generic like "mouse"
Remove references to the product and vendor IDs
Use protocol "auto"
Use device "/dev/mouse" (assuming this is where that device is located in Mandriva).
Remove the HWheelRelative option, adding it later if necessary.I hope it works out.
daou
June 2nd, 2007, 06:10 AM
I can't seem to get btnx to recognize my mouse properly. I have a Logitech Revolution MX mouse and a Logitech G15 keyboard.
What's strage is that event3 is listed as a handler for the mouse but it doesn't exist. Touching event3 won't help because it won't get registered with the kernel's input interface.
The cat command you gave wouldn't have worked without a "sudo" or without running as root. But it should have given a "permission denied" error.
What version of Ubuntu are you running?
Try modprobing evdev.
sudo modprobe evdev
If you have rebooted your computer since you last looked at /proc/bus/input/devices, then find the event name again. Then search for that event name:
sudo find /dev -name *event3*
Replacing event3 with whatever it is at the moment.
A model troubleshooting post, by the way. I think I'll make a link to your post to show what information should be provided.
daou
June 2nd, 2007, 06:14 AM
I am using an "obsolete" (discontinued) MX1000 mouse and MX 518. However for some weird reason I did not succeed to get the hexdump from any other input devices than keyboard - only 'event1' gave the response when the keys on the keyboard are pressed - all other event handlers gave no results.
Try what blazoner suggested (LiveCD hexdumps).
It looks like you've used some other methods to get your mice working before. You need to remove some of those changes. Backup your xorg.conf file and look to this post (http://ubuntuforums.org/showpost.php?p=2761505&postcount=54) as a model for the InputSection. Remove anything extra.
daou
June 2nd, 2007, 06:17 AM
Haha I'm a retard I didn't have the mouse synced with the receiver.
:D We've all been there. Like cursing at network problems while holding one end of the ethernet cable in one hand.
daou
June 2nd, 2007, 06:26 AM
From post #28:
The problem I see with this approach is that if someone is trying different mouses, the third time they try the same mouse, it would overwrite the backup with a second backup.
I'm not sure if there is anything else I can do at btnx's end to make the Meta keys more functional. btnx supports sending that key as a modifier, but there is no one at the receiving end to catch them. Unless someone is using Beryl, or Kubuntu. Correct me if I'm wrong, its a while since I used Kubuntu, but it allows keyboard shortcuts with meta keys as modifiers.
And it probably isn't a problem. If a program does handle the meta keys well, then btnx already does its job. If it doesn't, ie Gnome keyboard shortcuts, then just about any other keyboard combo can be used. In fact, its better that the mouse reserves some obscure and difficult combo, one that you would have a hard time pressing with the keyboard.
The problem I see with this approach is that if someone is trying different mouses, the third time they try the same mouse, it would overwrite the backup with a second backup.
Yes, you are right. A loop could be applied that attempts to use btnx_config_bak0-32767 as the name for the backup. If a name exists, it tries the next number. That means you can have 2^15 different backup files. Should be enough, no ;)?
daou
June 2nd, 2007, 06:53 AM
blazoner,
A note on the MX 600, I am getting a response on pressing the 100% button as if it is only sending a BTN_LEFT event instead of BTN_LEFT + KEY_LEFTALT. Everything else is working great.I almost forgot about this. Apparently it handles the event just fine. But there seems to be a problem with registering the modifier key well before the button event. This was a problem during development and I implemented a slight delay to allow the modifier keys to register before other keys and buttons. Perhaps you need to increase the delay a little more.
This involves a small change in source code. Don't worry, I'll walk you through it.
Go into the directory where you extracted btnx. Open the file uinput.c
In that file, find this section:
write(uinput_kbd_fd, &event, sizeof(event));
usleep(10); // Needs a little delay for mouse + modifier combo
}
if (bev->keycode > BTNX_EXTRA_EVENTS)Note the call "usleep(10)". You can increase the number 10 to a 100 or even more. When you change that value, do a make and sudo ./btnx
If it works, run sudo make install, but remember to backup the conf file.
Tell me what delay works for you. I'll increase that delay in the next update.
Dritzen
June 2nd, 2007, 03:50 PM
What's strange is that event3 is listed as a handler for the mouse but it doesn't exist. Touching event3 won't help because it won't get registered with the kernel's input interface.
The cat command you gave wouldn't have worked without a "sudo" or without running as root. But it should have given a "permission denied" error.
What version of Ubuntu are you running?
Try modprobing evdev.
sudo modprobe evdev
If you have rebooted your computer since you last looked at /proc/bus/input/devices, then find the event name again. Then search for that event name:
sudo find /dev -name *event3*
Replacing event3 with whatever it is at the moment.
A model troubleshooting post, by the way. I think I'll make a link to your post to show what information should be provided.
I rebooted and now it is on event6
When I run btnx, it still doesn't work. event6 doesn't exist in /dev/input/
alex@host:~/btnx-0.2.6$ sudo find /dev -name *event6*
/dev/.udev/names/input%2fevent10/%2fclass%2finput%2finput6%2fevent6/dev/.udev/names/input%2fby-path%2fpci-0000:00:1d.3-usb-0:2:1.0-event-mouse/%2fclass%2finput%2finput6%2fevent6
/dev/.udev/names/input%2fby-id%2fusb-Logitech_USB_Receiver-event-mouse/%2fclass%2finput%2finput6%2fevent6
/dev/.udev/db/%2fclass%2finput%2finput6%2fevent6
I initialized evdev by doing this:
sudo modprobe evdev
It runs but doesn't have any ouptut, I'm positive that evdev is installed. I was using it previously.
I even tried linking one of the /dev/.udev/ files to event6
alex@host:~/btnx-0.2.6$ sudo ln -s /dev/.udev/names/input%2fby-path%2fpci-0000:00:1d.3-usb-0:2:1.0-event-mouse/%2fclass%2finput%2finput6%2fevent6 /dev/input/event6
After I did this, I ran btnx as root and btnx segfaulted
alex@host:~/btnx-0.2.6$ sudo ./btnx
Detected mouse: mxrevo Vendor=046d Product=c51a
Device and event handler detection complete.
-Using event: event6
Opened handler: /dev/input/event6
Opened handler: /dev/input/event7
Opened handler: /dev/input/uinput
Opened handler: /dev/input/uinput
No startup errors
Segmentation fault (core dumped)
I'm running Ubuntu 7.04, upgraded from 6.10. It's pretty much a regular install, I didn't use automatix or anything like that.
daou
June 2nd, 2007, 03:58 PM
When I run btnx, it still doesn't work. event6 doesn't exist in /dev/input/
Try hexdumping the event handlers in /dev/input/by-id and /dev/input/by-path
$ sudo cat /dev/input/by-id/somename | hexdump
Move your mouse and see if one of them outputs any data.
Dritzen
June 2nd, 2007, 04:32 PM
Try hexdumping the event handlers in /dev/input/by-id and /dev/input/by-path
$ sudo cat /dev/input/by-id/somename | hexdump
Move your mouse and see if one of them outputs any data.
I hexdumped all of them.
alex@host:~$ sudo find /dev -name *event6*
/dev/.udev/names/input%2fevent10/%2fclass%2finput%2finput6%2fevent6
/dev/.udev/names/input%2fby-path%2fpci-0000:00:1d.3-usb-0:2:1.0-event-mouse/%2fclass%2finput%2finput6%2fevent6
/dev/.udev/names/input%2fby-id%2fusb-Logitech_USB_Receiver-event-mouse/%2fclass%2finput%2finput6%2fevent6
/dev/.udev/db/%2fclass%2finput%2finput6%2fevent6
alex@host:~$ sudo cat /dev/.udev/names/input%2fevent10/%2fclass%2finput%2finput6%2fevent6 | hexdump
alex@host:~$ sudo cat /dev/.udev/names/input%2fby-path%2fpci-0000:00:1d.3-usb-0:2:1.0-event-mouse/%2fclass%2finput%2finput6%2fevent6 | hexdump
alex@host:~$ sudo cat /dev/.udev/names/input%2fby-id%2fusb-Logitech_USB_Receiver-event-mouse/%2fclass%2finput%2finput6%2fevent6 | hexdump
alex@host:~$ sudo cat /dev/.udev/db/%2fclass%2finput%2finput6%2fevent6 | hexdump
0000000 3a4e 6e69 7570 2f74 7665 6e65 3174 0a30
0000010 3a53 6e69 7570 2f74 7962 692d 2f64 7375
0000020 2d62 6f4c 6967 6574 6863 555f 4253 525f
0000030 6365 6965 6576 2d72 7665 6e65 2d74 6f6d
0000040 7375 0a65 3a53 6e69 7570 2f74 7962 702d
0000050 7461 2f68 6370 2d69 3030 3030 303a 3a30
0000060 6431 332e 752d 6273 302d 323a 313a 302e
0000070 652d 6576 746e 6d2d 756f 6573 4d0a 313a
0000080 3a33 3037 450a 493a 5f44 4556 444e 524f
0000090 4c3d 676f 7469 6365 0a68 3a45 4449 4d5f
00000a0 444f 4c45 553d 4253 525f 6365 6965 6576
00000b0 0a72 3a45 4449 525f 5645 5349 4f49 3d4e
00000c0 3134 3130 450a 493a 5f44 4553 4952 4c41
00000d0 4c3d 676f 7469 6365 5f68 5355 5f42 6552
00000e0 6563 7669 7265 450a 493a 5f44 5954 4550
00000f0 683d 6469 450a 493a 5f44 5542 3d53 7375
0000100 0a62 3a45 4449 435f 414c 5353 6d3d 756f
0000110 6573 450a 493a 5f44 4150 4854 703d 6963
0000120 302d 3030 3a30 3030 313a 2e64 2d33 7375
0000130 2d62 3a30 3a32 2e31 0a30
000013a
When I run:
alex@host:~$ sudo cat /dev/.udev/db/%2fclass%2finput%2finput6%2fevent6 | hexdump
It outputs the same info every time, regardless of whether the mouse moves. In fact, it outputs if the mouse doesn't even move.
RVDowning
June 2nd, 2007, 04:36 PM
I don't know what your xorg.conf looks like now, but looking at the old one, I think you should try to do the following (making a backup first):
Merge your InputSections into one input section.
Remove evdev as the driver, use something more generic like "mouse"
Remove references to the product and vendor IDs
Use protocol "auto"
Use device "/dev/mouse" (assuming this is where that device is located in Mandriva).
Remove the HWheelRelative option, adding it later if necessary.
I hope it works out.
Actually my xorg.conf looks exactly the way you wanted. I added "modprobe uinput", a directory change, and ./btnx to /etc/rc.d/rc.local for Mandriva 2007.1 so that stuff would auto load.
Now I think I will add in revoco, and will have the "coolest mouse in town."
Thanks much for all your help.
blazoner
June 3rd, 2007, 07:08 PM
OK, I've been playing around with the settings a bit, and have noticed that you have gotten the shortcuts for firefox back/forward switched around.
KEY_LEFT & KEY_LEFTALT should be back in history, and KEY_RIGHT & KEY_LEFTALT should be forward.
sjust
June 3rd, 2007, 07:31 PM
Well I finally have a day off and I am trying btnx. I does reconize my mouse but does not work. I have read through all the posts so far. Here is all the info I can give you
sam@samstoy:~/btnx-0.2.6$sudo ./btnx
Detected mouse: mx510 Vendor=046d Product=c01d
Did not find additional event handlers. No problem.
Device and event handler detection complete.
-Using event: event2
Error opening button event file descriptor"event2": No such file or directory
There is no event2 in /dev/input
sam@samstoy:~/btnx-0.2.6$sudo cat /dev/input/event2
cat: /dev/input/event2: No such file or directory
sam@samstoy:~/btnx-0.2.6$cat /proc/bus/input/devices | grep Product=c01d -A 6
I: Bus=0003 Vendor=046d Product=c01d Version=0110
N: Name="Logitech USB-PS/2 Optical Mouse"
P: Phys=usb-0000:00:02.0-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
this is my config file.
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
Option "Buttons" "10"
EndSection
sam@samstoy:~/btnx-0.2.6$sudo find /dev -name *event2*
/dev/.static/dev/input/event2
/dev/.udev/names/input%2fevent9/%2fclass%2finput%2finput2%2fevent2
/dev/.udev/names/input%2fby-path%2fpci-0000:00:02.0-usb-0:1:1.0-event-mouse/%2fclass%2finput%2finput2%2fevent2
/dev/.udev/names/input%2fby-id%2fusb-Logitech_USB-PS.2_Optical_Mouse-event-mouse/%2fclass%2finput%2finput2%2fevent2
/dev/.udev/db/%2fclass%2finput%2finput2%2fevent2
If you need any more info just let me know.
blazoner
June 4th, 2007, 06:27 AM
Some problems with my MX 600 on a fresh 7.04 install:
1. Ctrl+Alt+Right (rear thumb button) only works if the mouse is over the desktop itself, not when it is over any window (firefox, OOo, etc.) Ctrl+Alt+Left works both on the desktop, and in windows, as per normal behavior.
2. The 100% button still only acts like a Left click, except in terminal, where it outputs the same as a middle click. I extended that delay to as much as 150 with no noticeable improvement.
3. The 100% button, the rear thumb button, and the left scroll wheel press, all register as paste (middle click) in terminal, and the left scroll wheel press then outputs a "C". This seems to be the common denominator between the buttons that are giving me problems.
tim71
June 4th, 2007, 02:39 PM
Here's MX1000 data on 32bit system
I: Bus=0003 Vendor=046d Product=c50e Version=0111
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:02.0-1/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=143
B: LED=ff00
left button
0000000 3d7c 4664 f9f2 0009 0001 0110 0001 0000 - press
0000010 3d7c 4664 f9fd 0009 0000 0000 0000 0000
0000020 3d7c 4664 4b96 000c 0001 0110 0000 0000 - release
0000030 3d7c 4664 4b9e 000c 0000 0000 0000 0000
right button
0000000 3dad 4664 4313 000d 0001 0111 0001 0000 - press
0000010 3dad 4664 431c 000d 0000 0000 0000 0000
0000020 3dae 4664 71b6 0000 0001 0111 0000 0000 - release
0000030 3dae 4664 71c0 0000 0000 0000 0000 0000
middle button front
0000000 3dec 4664 6fd1 000e 0001 0116 0001 0000 - press
0000010 3dec 4664 6fdc 000e 0000 0000 0000 0000
0000020 3dec 4664 ae51 000e 0002 0008 0001 0000
0000030 3dec 4664 ae5a 000e 0000 0000 0000 0000 - release
0000040 3ded 4664 fc2f 0001 0001 0116 0000 0000
0000050 3ded 4664 fc39 0001 0000 0000 0000 0000
middle button rear
0000000 3e26 4664 2cfb 0003 0001 0117 0001 0000 - press
0000010 3e26 4664 2d00 0003 0000 0000 0000 0000
0000020 3e26 4664 6b7a 0003 0002 0008 ffff ffff
0000030 3e26 4664 6b83 0003 0000 0000 0000 0000 - release
0000040 3e26 4664 dc5b 0005 0001 0117 0000 0000
0000050 3e26 4664 dc60 0005 0000 0000 0000 0000
wheel tilt left
0000000 3e5c 4664 52b0 0001 0001 0118 0001 0000 - press
0000010 3e5c 4664 52b3 0001 0000 0000 0000 0000
0000020 3e5c 4664 b06a 0001 0002 0006 ffff ffff
0000030 3e5c 4664 b06f 0001 0000 0000 0000 0000 - release
0000040 3e5c 4664 c395 0003 0001 0118 0000 0000
0000050 3e5c 4664 c398 0003 0000 0000 0000 0000
wheel tilt right
0000000 3e82 4664 075c 0004 0001 0119 0001 0000 - press
0000010 3e82 4664 075f 0004 0000 0000 0000 0000
0000020 3e82 4664 45d8 0004 0002 0006 0001 0000
0000030 3e82 4664 45de 0004 0000 0000 0000 0000 - release
0000040 3e82 4664 b6ba 0006 0001 0119 0000 0000
0000050 3e82 4664 b6bd 0006 0000 0000 0000 0000
wheel click
0000000 3ec6 4664 e5f6 0006 0001 0112 0001 0000 - press
0000010 3ec6 4664 e5ff 0006 0000 0000 0000 0000
0000020 3ec6 4664 9556 0009 0001 0112 0000 0000 - release
0000030 3ec6 4664 9561 0009 0000 0000 0000 0000
thumb front button
0000000 3f10 4664 2b43 000d 0001 0114 0001 0000 - press
0000010 3f10 4664 2b4d 000d 0000 0000 0000 0000
0000020 3f11 4664 d6e2 0000 0001 0114 0000 0000 - release
0000030 3f11 4664 d6ed 0000 0000 0000 0000 0000
thumb middle button
0000000 3f93 4664 f5c6 0006 0001 0115 0001 0000 - press
0000010 3f93 4664 f5d1 0006 0000 0000 0000 0000
0000020 3f93 4664 f6cc 000b 0001 0115 0000 0000 - release
0000030 3f93 4664 f6d6 000b 0000 0000 0000 0000
thumb rear button
0000000 5368 4664 0b77 0009 0001 0113 0001 0000 - press
0000010 5368 4664 0b7f 0009 0000 0000 0000 0000
0000020 5368 4664 37d4 000c 0001 0113 0000 0000 - release
0000030 5368 4664 37dc 000c 0000 0000 0000 0000
blazoner
June 5th, 2007, 08:02 AM
Well, I've tried my MX 600 with both of my PC's now, and the problems are consistent with both, as are the hexdumps. I have no clue what to try next, so I'm including a text file with all the results I've accumulated so far.
Here's what's not working:
1. Ctrl+Alt+Right (rear thumb button) sometimes works if the mouse is over the desktop itself, not as often when it is over any window (firefox, OOo, etc.) Ctrl+Alt+Left works both on the desktop, and in windows, but only sometimes. ***This behavior is extremely sporadic, and the only way to make it work every time is to click and hold the right button first.
2. The 100% button acts like a wheel click. I extended that delay to as much as 500 with no noticeable improvement.
sjust
June 5th, 2007, 06:38 PM
I just want ot let every one know that I fixed my problem. It seems the I forgot about a rules.d file from a previous configuration. Once I got rid of that btnx works great.
daou
June 7th, 2007, 04:20 PM
When I run:
alex@host:~$ sudo cat /dev/.udev/db/%2fclass%2finput%2finput6%2fevent6 | hexdump
It outputs the same info every time, regardless of whether the mouse moves. In fact, it outputs if the mouse doesn't even move.
This has to be some special configuration on your Ubuntu. Have you used any other howto's to configure your mouse? btnx will only work if you get mouse events from an event handler.
daou
June 7th, 2007, 04:23 PM
Actually my xorg.conf looks exactly the way you wanted. I added "modprobe uinput", a directory change, and ./btnx to /etc/rc.d/rc.local for Mandriva 2007.1 so that stuff would auto load.
Now I think I will add in revoco, and will have the "coolest mouse in town."
Thanks much for all your help.
No problem at all. Did you get btnx to function fully? If it does, could you send me your InputSection from your xorg.conf file. This will help me deal with problems other users may have.
daou
June 7th, 2007, 04:27 PM
Some problems with my MX 600 on a fresh 7.04 install:
1. Ctrl+Alt+Right (rear thumb button) only works if the mouse is over the desktop itself, not when it is over any window (firefox, OOo, etc.) Ctrl+Alt+Left works both on the desktop, and in windows, as per normal behavior.
2. The 100% button still only acts like a Left click, except in terminal, where it outputs the same as a middle click. I extended that delay to as much as 150 with no noticeable improvement.
3. The 100% button, the rear thumb button, and the left scroll wheel press, all register as paste (middle click) in terminal, and the left scroll wheel press then outputs a "C". This seems to be the common denominator between the buttons that are giving me problems.
1. I'm not experiencing any of these problems. Anyone else have this?
For 1, 2, & 3, try using xev to see what kind of output you are getting for each mouse button press. Especially for #3: make sure xev doesn't report a middle click.
daou
June 7th, 2007, 04:28 PM
Here's MX1000 data on 32bit system
Support for MX1000 will be added in a couple of days.
daou
June 7th, 2007, 04:30 PM
Well, I've tried my MX 600 with both of my PC's now, and the problems are consistent with both, as are the hexdumps. I have no clue what to try next, so I'm including a text file with all the results I've accumulated so far.
Here's what's not working:
1. Ctrl+Alt+Right (rear thumb button) sometimes works if the mouse is over the desktop itself, not as often when it is over any window (firefox, OOo, etc.) Ctrl+Alt+Left works both on the desktop, and in windows, but only sometimes. ***This behavior is extremely sporadic, and the only way to make it work every time is to click and hold the right button first.
2. The 100% button acts like a wheel click. I extended that delay to as much as 500 with no noticeable improvement.
I'll look at this later and try to think of something.
daou
June 7th, 2007, 04:34 PM
I just want ot let every one know that I fixed my problem. It seems the I forgot about a rules.d file from a previous configuration. Once I got rid of that btnx works great.
I'm glad it works! Sorry I couldn't respond to your earlier post before, but it looks like I didn't even need to ;).
I'm not really even sure whether this program works for most people because most of the posts on this forum are the result of problems with btnx. I hope it's working like advertised :D.
RVDowning
June 7th, 2007, 05:41 PM
No problem at all. Did you get btnx to function fully? If it does, could you send me your InputSection from your xorg.conf file. This will help me deal with problems other users may have.
Everything seems to work right. I think the thumb buttons are backwards as mentioned in another post, but haven't fixed it yet. InputDevice section of xorg.conf follows:
Section "InputDevice"
Identifier "ConfiguredMouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/mouse"
Option "Protocol" "auto"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "no"
Option "Buttons" "3"
EndSection
Again, the distribution is Mandriva Spring 2007.1.
Dritzen
June 8th, 2007, 04:17 PM
This has to be some special configuration on your Ubuntu. Have you used any other howto's to configure your mouse? btnx will only work if you get mouse events from an event handler.
Don't let anyone tell you that you don't know your stuff. You were right! I had some rules leftover from using this guide previously: http://ubuntuforums.org/showthread.php?t=219894
I removed evdev and undid the things that were in that guide, then I copied the revolution MX config over the default btnx and now everything is working perfectly. Hell, I didn't even know I could use the mouse wheel to push it right and left. The config is really good.
Thanks a lot for your hard work daou and for troubleshooting everything.
derekwp
June 8th, 2007, 06:32 PM
Firstly daou, thanks for the scripts, work and troubleshooting you have done. Much appreciated.
I am trying to understand how it would be possible for my MX510 to on middle-mouse click, I think the config file it is entitled "Mouse wheel press," for it to scroll a window. I believe this is the default setup for Windows for this mouse. Apologies if this has been gone over before, I didn't see it. Thanks again.
Derek
daou
June 9th, 2007, 05:15 AM
Well, I've tried my MX 600 with both of my PC's now, and the problems are consistent with both, as are the hexdumps. I have no clue what to try next, so I'm including a text file with all the results I've accumulated so far.
Here's what's not working:
1. Ctrl+Alt+Right (rear thumb button) sometimes works if the mouse is over the desktop itself, not as often when it is over any window (firefox, OOo, etc.) Ctrl+Alt+Left works both on the desktop, and in windows, but only sometimes. ***This behavior is extremely sporadic, and the only way to make it work every time is to click and hold the right button first.
2. The 100% button acts like a wheel click. I extended that delay to as much as 500 with no noticeable improvement.
It sounds like you are getting a mouse button down event when pressing the C+A+Left and right combos. This will block the workspace switch functionality. For example, if I hold down my left or right mouse button and send the combo, no workspace switch takes place.
Perhaps your xserver is handling those extra mouse buttons after all (when you don't want it to, at least not with btnx). Try what worked for MX Revo users: change the Option "Protocol" to "auto" in your InputSection of xorg.conf. Right now your protocol is set to "ExplorerPS/2" and this might be a problem. Tell me what happens. If it doesn't fix the problem, I'll look at it some more.
daou
June 9th, 2007, 05:23 AM
OK, I've been playing around with the settings a bit, and have noticed that you have gotten the shortcuts for firefox back/forward switched around.
KEY_LEFT & KEY_LEFTALT should be back in history, and KEY_RIGHT & KEY_LEFTALT should be forward.
You are right (someone else mentioned this as well). It was just a careless comment error in the config files but will be fixed in the upcoming update. Won't affect functionality.
daou
June 9th, 2007, 06:42 AM
btnx has been updated to version 0.2.7
Changes include:
Support for MX-1000. NOTE: MX-1000 will not be autoconfigured correctly on the first installation. See the FAQ section in the first post on this thread for a workaround.
Better installation script. Checks for an old configuration file and asks whether you want to keep it. Even if you discard the old config file, a backup is created.
Experimental support for VX Revolution mice with product ID=c521 (should be c518 ). Someone had this issue, not sure whether its a new batch of VX's or an error of some sort. VX's with this product ID use the same old VX config file, assuming none of the event codes have changed. If they have, I need hexdumps for a VX with product ID=c521
daou
June 9th, 2007, 06:51 AM
tim71,
If you have used another howto to configure the MX-1000, make sure to revert those changes first. See the troubleshooting section if this is the case.
Another thing: you specified tilt wheel left and right events in your hexdumps. However, as far as I know, the MX-1000 has 4 buttons around the wheel (up, down, left, right).
Did you mean the tilt events were for actually moving the mouse wheel sideways or pressing the buttons around them?
If your MX-1000 wheel has sideways tilt functions, you can uncomment the tilt wheel left and right sections in the MX-1000 config file. If the tilts and the left and right middle buttons are the same things, keep the tilt sections commented out.
daou
June 9th, 2007, 07:07 AM
Don't let anyone tell you that you don't know your stuff. You were right! I had some rules leftover from using this guide previously: http://ubuntuforums.org/showthread.php?t=219894
I removed evdev and undid the things that were in that guide, then I copied the revolution MX config over the default btnx and now everything is working perfectly. Hell, I didn't even know I could use the mouse wheel to push it right and left. The config is really good.
Thanks a lot for your hard work daou and for troubleshooting everything.
No problem. I'm glad you were able to sort it out. I've added a note about problems like this in the troubleshooting section.
And the default MX Revo config is what I use at home. It's really useful when having 5 firefoxes open with 10 tabs each, 1 workspace for surfing/music/IM, another for coding, and the last two for electronics work (schematics and pcb work) ;). But the most important thing is that everyone can configure it to their liking and use style.
Actually, I was thinking about having multiple configuration support for btnx. The user could give a command (or press a mouse button) to switch btnx to use another config file. So, for example, I could have one config for surfing, press a button and switch to a config for coding. This wouldn't be a small change, however.
daou
June 9th, 2007, 07:16 AM
Firstly daou, thanks for the scripts, work and troubleshooting you have done. Much appreciated.
I am trying to understand how it would be possible for my MX510 to on middle-mouse click, I think the config file it is entitled "Mouse wheel press," for it to scroll a window. I believe this is the default setup for Windows for this mouse. Apologies if this has been gone over before, I didn't see it. Thanks again.
Derek
No problem. But I didn't fully understand what you want your MX510 to do on a middle-mouse click-> "for my MX510 to ? on middle-mouse click". Could you specify this a bit more?
Or did you mean this: press the middle mouse button and the cursor changes to a scroll cursor. When you move the mouse up and down, it scrolls the webpage. In this case, its just a Firefox option: Edit->Preferences->Advanced->Use autoscrolling
Check that option and it should work.
derekwp
June 9th, 2007, 10:16 AM
No problem. But I didn't fully understand what you want your MX510 to do on a middle-mouse click-> "for my MX510 to ? on middle-mouse click". Could you specify this a bit more?
Or did you mean this: press the middle mouse button and the cursor changes to a scroll cursor. When you move the mouse up and down, it scrolls the webpage. In this case, its just a Firefox option: Edit->Preferences->Advanced->Use autoscrolling
Check that option and it should work.
Daou
Indeed sir, thanks very much.
tim71
June 9th, 2007, 02:59 PM
tim71,
If you have used another howto to configure the MX-1000, make sure to revert those changes first. See the troubleshooting section if this is the case.
Only thing I use now is evdev (for hexdumping I had to change the driver temporarily)
Another thing: you specified tilt wheel left and right events in your hexdumps. However, as far as I know, the MX-1000 has 4 buttons around the wheel (up, down, left, right).
Did you mean the tilt events were for actually moving the mouse wheel sideways or pressing the buttons around them?
It is just what it says - wheel can be tilted sideways - only buttons around the wheel are "front" and "rear" buttons as can be seen here (http://www.logitech.com/repository/444/jpg/3251.1.0.jpg). These pictures can be confusing and it might look like there are 4 buttons.
If your MX-1000 wheel has sideways tilt functions, you can uncomment the tilt wheel left and right sections in the MX-1000 config file. If the tilts and the left and right middle buttons are the same things, keep the tilt sections commented out.[/QUOTE]
Only additional buttons are thumb buttons (3 of them) and buttons in front and rear of the wheel.
tim71
June 9th, 2007, 03:01 PM
I tried to get the dumps from MX-518, but some buttons did not gave any output. Not sure what the problem is at the moment...
daou
June 9th, 2007, 03:57 PM
Only thing I use now is evdev (for hexdumping I had to change the driver temporarily)
Does your MX-1000 work with btnx now?
gnyffel
June 9th, 2007, 05:27 PM
I've just installed your script to use with my Logitech G5.
You wouldn't believe how long I've been searching for a straightforward way to configure it. Btnx worked flawlessly and with no configuration at all!
Thank you! :D
tim71
June 9th, 2007, 06:06 PM
Does your MX-1000 work with btnx now?
Yes it works. I took the default_config_MX1000 file and copied it in btnx_config place.
The "middle button left" and "middle button right" events had to be commented out and wheel tilt events uncommented - then things started to work.
P.S. One thing makes me thinking - is there a way to define doubleclick event?
daou
June 9th, 2007, 06:33 PM
Yes it works. I took the default_config_MX1000 file and copied it in btnx_config place.
The "middle button left" and "middle button right" events had to be commented out and wheel tilt events uncommented - then things started to work.
P.S. One thing makes me thinking - is there a way to define doubleclick event?
Ok, I'll fix that. Doubleclicking isn't technically supported, but there's a small hack to make it work. You can change the type value of a button that is originally set to type=0. Change it to type=1 and then keycode=BTN_LEFT
That should make a double left click. Playing with the type values isn't exactly recommended.
blazoner
June 9th, 2007, 07:29 PM
OK, here goes:
Here's the "InputDevice" section of my xorg.conf:
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "Device" "/dev/input/mice"
Option "Protocol" "auto"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "no"
Option "Buttons" "3"
EndSection
If you refer back to that text file I posted, you will see that the second half includes the hexdump info from after I changed the protocol to "auto".
When I get a chance, I'll swap mouses while running windoze, in case it's just a malfunctioning mouse.
*** As an aside, if anyone is using a mouse that has been configured previously using some other method, like evdev, my suggestion is to hexdump off of a live CD, rather than trying to undo all their hard work first. i.e. record the hexdump in a text file, and email it to themselves, or write it strait to a floppy, rather than leaving it in temporary filespace that disappears upon reboot. (You could also manually mount your filesystem, but that's probably a bit much trouble to go through.)
tim71
June 9th, 2007, 07:41 PM
Doubleclicking isn't technically supported, but there's a small hack to make it work. You can change the type value of a button that is originally set to type=0. Change it to type=1 and then keycode=BTN_LEFT
That should make a double left click. Playing with the type values isn't exactly recommended.
Thanks for the tip. It seems to work, but not 100% - in some programs thing does a "wrong move" sometimes. Will try to test it more.
tim71
June 9th, 2007, 07:48 PM
As an aside, if anyone is using a mouse that has been configured previously using some other method, like evdev, my suggestion is to hexdump off of a live CD, rather than trying to undo all their hard work first. i.e. record the hexdump in a text file, and email it to themselves, or write it strait to a floppy, rather than leaving it in temporary filespace that disappears upon reboot. (You could also manually mount your filesystem, but that's probably a bit much trouble to go through.)
I had no problem with this - i just commented out evdev-driven InputDevice and reference to it in ServerLayout section of xorg.conf leaving me with the default Mouse0 input device. Dumps came out fine after that and now btnx works too. And there is always easy way to change back - just uncomment few lines in xorg.conf and restart X.
blazoner
June 9th, 2007, 08:02 PM
Ok, I'll fix that. Doubleclicking isn't technically supported, but there's a small hack to make it work. You can change the type value of a button that is originally set to type=0. Change it to type=1 and then keycode=BTN_LEFT
That should make a double left click. Playing with the type values isn't exactly recommended.
Just remember that this approach requires both the press and release events in order to register a "double-click". In other words, if you click and hold the button for too long, it won't "double-click", but will still register two separate BTN_LEFT events.
Another method (http://ubuntuforums.org/showthread.php?t=316441) some people have used includes XBindKeys (http://hocwp.free.fr/xbindkeys/xbindkeys.html).
It would be nice if there were a simple wrapper for creating keyboard shortcuts using uinput or something similar. (I haven't found any yet.) Letting you map Key and button events, and even call scripts.
"System - Preferences - Keyboard Shortcuts" seems woefully inadequate for this process.
blazoner
June 9th, 2007, 08:15 PM
I had no problem with this - i just commented out evdev-driven InputDevice and reference to it in ServerLayout section of xorg.conf leaving me with the default Mouse0 input device. Dumps came out fine after that and now btnx works too. And there is always easy way to change back - just uncomment few lines in xorg.conf and restart X.
Cool! I'm still a noob, and constantly learning more. Thanks for the tip! :D
sjust
June 10th, 2007, 01:13 PM
Igot btnx working like I want for the most part. I set up the side buttons for forward an back in firefox and naultilist. The only problem I have is when I go back or foward in firefox, I get sent two pages instead of one. I have the buttons configures this way. It does not happen in naultilist so I think it is just firefox.
Front side button
Button
rawcode = 0x01011400
type = 0
keycode = KEY_RIGHT
mod1 = KEY_LEFTALT
EndButton
Rear side button
Button
rawcode = 0x01011300
type = 0
keycode = KEY_LEFT
mod1 = KEY_LEFTALT
EndButton
If any one has any ideas please let me know
daou
June 10th, 2007, 01:58 PM
Igot btnx working like I want for the most part. I set up the side buttons for forward an back in firefox and naultilist. The only problem I have is when I go back or foward in firefox, I get sent two pages instead of one. I have the buttons configures this way. It does not happen in naultilist so I think it is just firefox.
Front side button
Button
rawcode = 0x01011400
type = 0
keycode = KEY_RIGHT
mod1 = KEY_LEFTALT
EndButton
Rear side button
Button
rawcode = 0x01011300
type = 0
keycode = KEY_LEFT
mod1 = KEY_LEFTALT
EndButtonIf any one has any ideas please let me know
Try using the same buttons in firefox without btnx. It is possible that you are getting mouse events without btnx that firefox already interprets as back/forward commands.
sjust
June 10th, 2007, 05:37 PM
You are right. I stoped btnx and the back button only goes back one instead of two. Of course the other buttons do not work right now. Back button does not work in naultilist any more either. I guess I will either have to have btnx not work with firefox or tweak the settings in firefox.
daou
June 10th, 2007, 05:57 PM
You are right. I stoped btnx and the back button only goes back one instead of two. Of course the other buttons do not work right now. Back button does not work in naultilist any more either. I guess I will either have to have btnx not work with firefox or tweak the settings in firefox.
Make sure you have "Protocol" set to "auto" in your xorg.conf InputSection.
sjust
June 10th, 2007, 09:50 PM
I do have it set to auto.
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
Option "Buttons" "10"
EndSection
Imight have something else wrong take a look.
daou
June 11th, 2007, 01:15 AM
I do have it set to auto.
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
Option "Buttons" "10"
EndSectionImight have something else wrong take a look.
Drop the Buttons option down to 3
sjust
June 11th, 2007, 06:18 AM
Changing option buttons to 3 did not help still moves two pages. Well off to work. I will have to work on it later in the week.
blazoner
June 11th, 2007, 02:31 PM
Changing option buttons to 3 did not help still moves two pages. Well off to work. I will have to work on it later in the week.
Did you remember to restart btnx?
KaMZaTa
June 11th, 2007, 03:11 PM
It works fine on my MX Revolution but... I've associated thumb button back and forward with ALT+LEFT and ALT+RIGHT to go back and forward on firefox but often when I press one of it seems as stuck and for example it go back not of one page but 10 pages! Nautilus back and forward works fine. How can I do? Tnks
daou
June 11th, 2007, 03:11 PM
Someone asked when btnx will get its own GUI configuration utility. I find editing text files to be the quickest and easiest but this is not the case for most. I'm not a big fan of coding GUI apps, so I'm a bit reluctant to do it. Maybe someone would like to implement this? A few points:
Should be a GTK+ app for maximum compatibility.
Should be a separate install. For example, a simple GTK+ app needs a couple of development libraries to be installed (GTK, glib, etc). This makes compiling btnx more of a hassle. Unless both are included in a debian binary package.
Config files and the config parser need a few minor changes before this can be done well. Once this is done, the config app can utilize the config_parser.c file so no one has to write their own parser.If no one else is interested, I might code it later. When I'm really bored ;).
daou
June 11th, 2007, 03:18 PM
It works fine on my MX Revolution but... I've associated thumb button back and forward with ALT+LEFT and ALT+RIGHT to go back and forward on firefox but often when I press one of it seems as stuck and for example it go back not of one page but 10 pages! Nautilus back and forward works fine. How can I do? Tnks
I have the default setting for my thumb wheel, but I get the same result sometimes. When pushing the thumb wheel forward, it seems to get stuck. It seems like btnx never catches the release event. It happens very rarely, and never when pulling the thumb wheel back. This is one reason why I suspect it's an electrical/mechanical problem with the thumb wheel itself (and until now, no one else has mentioned it).
There is a way I can possibly limit the effect in the code. I'll try adding that in the next update.
KaMZaTa
June 11th, 2007, 03:36 PM
Someone asked when btnx will get its own GUI configuration utility. I find editing text files to be the quickest and easiest but this is not the case for most. I'm not a big fan of coding GUI apps, so I'm a bit reluctant to do it. Maybe someone would like to implement this? A few points:
Should be a GTK+ app for maximum compatibility.
Should be a separate install. For example, a simple GTK+ app needs a couple of development libraries to be installed (GTK, glib, etc). This makes compiling btnx more of a hassle. Unless both are included in a debian binary package.
Config files and the config parser need a few minor changes before this can be done well. Once this is done, the config app can utilize the config_parser.c file so no one has to write their own parser.If no one else is interested, I might code it later. When I'm really bored ;).
This would be great!
I have the default setting for my thumb wheel, but I get the same result sometimes. When pushing the thumb wheel forward, it seems to get stuck. It seems like btnx never catches the release event. It happens very rarely, and never when pulling the thumb wheel back. This is one reason why I suspect it's an electrical/mechanical problem with the thumb wheel itself (and until now, no one else has mentioned it).
There is a way I can possibly limit the effect in the code. I'll try adding that in the next update.
I don't think so. My mouse on Windows works perfectly.
tweak
June 11th, 2007, 03:41 PM
If you're interested, I can follow your instructions in your first post to provide the hexdump info for my Microsoft Intellimouse - I've had all manner of problems getting it's extra buttons configured and your project certainly seems like it should be able to help :)
sjust
June 11th, 2007, 03:43 PM
Yes I restarted btnx. I even rebooted to be sure, old windows habit.
daou
June 11th, 2007, 04:23 PM
I don't think so. My mouse on Windows works perfectly.
Ok it probably isn't the mouse's fault. I'm a little bit at loss as to what to do about it, though. It happens so rarely that it's really difficult to debug.
The fix I was thinking of doesn't work. The uinput interface seems to work strangely. There is a function call to set the repeat on and off. btnx never set it on.
There is another way. Keyboard presses could be defined to be one-shot events. That means that btnx won't be able to hold down keyboard events. Or it could be added as a configuration option. I'm still not sure why this happens with only one button, and it seems, only on the MX Revolution.
daou
June 11th, 2007, 04:25 PM
If you're interested, I can follow your instructions in your first post to provide the hexdump info for my Microsoft Intellimouse - I've had all manner of problems getting it's extra buttons configured and your project certainly seems like it should be able to help :smile:
That would be much appreciated! You might run into some trouble if you have old mouse button configurations on. If this happens, post about it here and I or someone else will help.
daou
June 11th, 2007, 04:29 PM
Yes I restarted btnx. I even rebooted to be sure, old windows habit.
Try this... it might not work, but it's all I've got right now:
xmodmap -e "pointer = 1 2 3 4 5 9 8 7 6"
tweak
June 11th, 2007, 04:30 PM
That would be much appreciated! You might run into some trouble if you have old mouse button configurations on. If this happens, post about it here and I or someone else will help.
Sweet. I'll get onto it in a few hours when I shoot home for lunch ;)
thelocust
June 12th, 2007, 12:35 AM
This is an awesome contribution. I just have one question, is there any way to get my middle wheel button back for my MX Rev. Currently I have my thumb wheel and search button configured to act as the middle wheel button but it just doesn't feel right. So is there any way to disable the switching back and forth from smooth scroll and get my middle button back. Thanks.
tweak
June 12th, 2007, 02:27 AM
That would be much appreciated! You might run into some trouble if you have old mouse button configurations on. If this happens, post about it here and I or someone else will help.
Ok here is the info for my "IntelliMouse Explorer 3.0 USB". In all cases I did the action (pressed a button or scrolled the wheel 1 unit) TWICE, and then took the SECOND set of data that appeared, exited hexdump, and then started again for the next action. Not sure if that makes a difference but it pays to be clear nonetheless.
I've always found mousewheel directions confusing so let me know if my labels aren't clear and I'll explain better. Also if you want me to do other stuff or repeat what's there then let me know.
:)
I: Bus=0011 Vendor=0002 Product=0006 Version=0000
N: Name="ImExPS/2 Generic Explorer Mouse"
P: Phys=isa0060/serio1/input0
S: Sysfs=/class/input/input1
H: Handlers=mouse0 event1 ts0
B: EV=7
B: KEY=1f0000 0 0 0 0 0 0 0 0
B: REL=103
left click
0000040 3a59 466e 058d 0001 0001 0110 0001 0000 press
0000050 3a59 466e 0599 0001 0000 0000 0000 0000
0000060 3a59 466e 62dc 0002 0001 0110 0000 0000 release
0000070 3a59 466e 62e4 0002 0000 0000 0000 0000
right click
0000040 39fb 466e 61a1 000e 0001 0111 0001 0000 press
0000050 39fb 466e 61aa 000e 0000 0000 0000 0000
0000060 39fc 466e a384 0000 0001 0111 0000 0000 release
0000070 39fc 466e a397 0000 0000 0000 0000 0000
wheel-button click
0000040 3a24 466e 1201 0007 0001 0112 0001 0000 press
0000050 3a24 466e 120a 0007 0000 0000 0000 0000
0000060 3a24 466e a5dd 0009 0001 0112 0000 0000 release
0000070 3a24 466e a5ef 0009 0000 0000 0000 0000
small thumb click
0000040 3a78 466e edcf 0003 0001 0114 0001 0000 press
0000050 3a78 466e edde 0003 0000 0000 0000 0000
0000060 3a78 466e 6a89 0007 0001 0114 0000 0000 release
0000070 3a78 466e 6a91 0007 0000 0000 0000 0000
large thumb click
0000040 3a96 466e b85c 0005 0001 0113 0001 0000 press
0000050 3a96 466e b869 0005 0000 0000 0000 0000
0000060 3a96 466e 2566 0008 0001 0113 0000 0000 release
0000070 3a96 466e 2578 0008 0000 0000 0000 0000
wheel-scroll down (as in pulling toward me, scrolling down a document)
0000020 3ab1 466e be89 000b 0002 0008 ffff ffff
0000030 3ab1 466e be92 000b 0000 0000 0000 0000
wheel-scroll up (as in pushing away from me, scrolling up a document)
0000020 3b02 466e 21e9 0003 0002 0008 0001 0000
0000030 3b02 466e 21f3 0003 0000 0000 0000 0000
sjust
June 12th, 2007, 06:05 AM
Try this... it might not work, but it's all I've got right now:
xmodmap -e "pointer = 1 2 3 4 5 9 8 7 6"
That worked. Thanks. I have changed my xmodmap file to reflect this. If anything changes I will post back.
daou
June 12th, 2007, 02:52 PM
btnx 0.2.8 has been released. Updates include:
Support for Microsoft Intellimouse Explorer 3 USB
Command executionYou can now configure the mouse to send a command when pressing a button. Example:
Button
rawcode = 0x12345678
type = 0
command = /usr/bin/gedit --new-window /etc/btnx/btnx_config
uid = 1000
EndButton
The command line is the program and its arguments that you want to execute. Make sure to give the full path of the program. The example launches gedit and opens the btnx_config file in a new window.
The UID field is pretty important. If you leave it blank or set it to 0, btnx will launch the commands as root. This isn't good from security's point of view. Also, some programs might not function correctly, especially if they have configuration files in your home directory. The program will think root is executing it and try using root's home. Use it with root privileges with caution: only if you really really need to.
You can get your UID by typing
$ echo $UIDin your terminal.
daou
June 12th, 2007, 02:56 PM
Ok here is the info for my "IntelliMouse Explorer 3.0 USB". In all cases I did the action (pressed a button or scrolled the wheel 1 unit) TWICE, and then took the SECOND set of data that appeared, exited hexdump, and then started again for the next action. Not sure if that makes a difference but it pays to be clear nonetheless.
I've always found mousewheel directions confusing so let me know if my labels aren't clear and I'll explain better. Also if you want me to do other stuff or repeat what's there then let me know.
Thanks for the info! There is something strange with your mouse's Vendor and Product IDs. Either Microsoft is using vendor IDs illegally or your Ubuntu doesn't recognize it correctly. Vendor=0002 belongs to a company called Ingram. Your mouse should have Vendor=045e and Product=0047. I added both of these just in case. Tell me if it works.
daou
June 12th, 2007, 02:59 PM
That worked. Thanks.
No problem.
I have changed my xmodmap file to reflect this. If anything changes I will post back.
Ok good, I won't need to explain that then ;).
daou
June 12th, 2007, 03:04 PM
This is an awesome contribution. I just have one question, is there any way to get my middle wheel button back for my MX Rev. Currently I have my thumb wheel and search button configured to act as the middle wheel button but it just doesn't feel right. So is there any way to disable the switching back and forth from smooth scroll and get my middle button back. Thanks.
I'm glad you like it. I'm not sure about the middle wheel button. It doesn't send any events to the input system, so there's no way for btnx to know when it's being pressed. It would probably need reverse engineering of MX Revo's USB interface, which is out of this program's scope. The revoco folks got the locking mechanism working through USB so they might know how to get it sending the middle wheel button events.
blazoner
June 12th, 2007, 04:01 PM
WOW! Really neat that you've added the ability to call scripts and programs! It keeps me from having to mess with arbitrary keyboard shortcuts. :)
Have you given any more thought to support for multiple/combination button presses? i.e. L+R = Middle button press?
By way of encouragement, please note that you will most likely only hear from those who are having problems. And some types of posts are conspicuous by their absence, most notably, after you add support for a new mouse, you aren't getting a lot of feedback saying "This isn't working."
Also, with 3,580 views in just 2 weeks, there's a lot less feedback than if btnx was causing people problems.
:KS Please keep up the great work! :KS
P.S. It sure would be nice if someone would come up with a simple wrapper for all USB non-storage devices to use uinput. It rocks!
daou
June 12th, 2007, 05:17 PM
WOW! Really neat that you've added the ability to call scripts and programs! It keeps me from having to mess with arbitrary keyboard shortcuts. :)
Have you given any more thought to support for multiple/combination button presses? i.e. L+R = Middle button press?
By way of encouragement, please note that you will most likely only hear from those who are having problems. And some types of posts are conspicuous by their absence, most notably, after you add support for a new mouse, you aren't getting a lot of feedback saying "This isn't working."
Also, with 3,580 views in just 2 weeks, there's a lot less feedback than if btnx was causing people problems.
:KS Please keep up the great work! :KS
P.S. It sure would be nice if someone would come up with a simple wrapper for all USB non-storage devices to use uinput. It rocks!
Thanks for the encouragement! It's a sure way to keep the updates rolling in ;).
The multiple button presses won't be easy. For left+right simultaneous press, it might not even work. Yes, it can be done, but btnx cannot stop the left and right mouse button signals from going into xserver. This means, that instead of getting one combined event, you would get three: left button, right button, and the btnx configured event.
For buttons that only btnx handles, it could be done. It would need big changes. Adding new fields (or even a new section) into the config file. Delaying events: the program has to wait a while to give the user a chance to press the other button. If the delay is too small, it would be hard or impossible to press the buttons at the exact right time. If the delay is too big, btnx will seem to "lag". It would need a lot of testing to get the delay just right.
Maybe I'll branch off a development version to test it so I can still keep making small updates on the side for new mice
And yes, uinput does rock :D. We can all thank it's author, Aristeu Sergio Rozanski Filho. Without it, btnx would have to be implemented as a kernel module and would never have gotten this far.
I hope people keep the mouse support requests coming. It's a shame people have to keep hitting their heads against the wall when there's a much easier way to configure their mouse :D:D.
thelocust
June 12th, 2007, 05:57 PM
Thanks allot I installed revoco (http://goron.de/%7Efroese/revoco/) and used the auto option sudo ./revoco auto=15,15 and surprisingly the middle button works now. In firefox it works, I use it allot for tabs, and when I press it in a dialog box or text editor it acts as a paste button which is even better.
tim71
June 12th, 2007, 06:12 PM
Little bit of testing has shown, that things are not 100% trouble-free.
Everything else seems to be fine, but I am seeing some kind of "dejavu-effect" when using Opera browser. It seems like Opera is receiving somehow "default" events from some buttons - as a result I have two simoultaneous actions - one defined by btnx and other one as like without btnx or even evdev.
Up to now I had not find similar problems in any other applications - probably needs some more testing.
P.S. And yes - i changed the "buttons" value to 3 in xorg.conf - seems to have no effect. If anyone has any more ideas to try out - they are welcome...
Little update - if btnx is stopped, then "native" events from additional buttons are still coming through to system. Not sure now what to do - if in most cases the problem is how to make additional buttons to work, then now the problem is, how to make them "inoperative" in native mode so only btnx events are received.
tim71
June 13th, 2007, 02:43 PM
One more thing - I cannot find a pidfile for btnx although I know, it is running (script in /init.d refers, that it should be something like '/var/run/btnx.pid')
blazoner
June 13th, 2007, 09:54 PM
Little bit of testing has shown, that things are not 100% trouble-free.
Everything else seems to be fine, but I am seeing some kind of "dejavu-effect" when using Opera browser. It seems like Opera is receiving somehow "default" events from some buttons - as a result I have two simoultaneous actions - one defined by btnx and other one as like without btnx or even evdev.
Up to now I had not find similar problems in any other applications - probably needs some more testing.
P.S. And yes - i changed the "buttons" value to 3 in xorg.conf - seems to have no effect. If anyone has any more ideas to try out - they are welcome...
Little update - if btnx is stopped, then "native" events from additional buttons are still coming through to system. Not sure now what to do - if in most cases the problem is how to make additional buttons to work, then now the problem is, how to make them "inoperative" in native mode so only btnx events are received.
Out of curiosity, do you by chance have an xmodmap file running from a previous setup?
I would also be curious to learn whether or not Opera has it's own event handlers. That could possibly explain extra events being sent to X only from within Opera.
tim71
June 14th, 2007, 01:49 AM
Now it seems, that some more activity can be observed in other places too, but it's not having such an affect as in Opera.
However interesting thing can be seen in xorg.0.log -
(**) Mouse0: Device: "/dev/psaux"
(==) Mouse0: Protocol: "Auto"
(**) Option "CorePointer"
(**) Mouse0: Core Pointer
(**) Option "Device" "/dev/psaux"
(**) Option "Buttons" "5"
(**) Option "Emulate3Buttons" "true"
(**) Mouse0: Emulate3Buttons, Emulate3Timeout: 50
(**) Option "ZAxisMapping" "4 5"
(**) Mouse0: ZAxisMapping: buttons 4 and 5
(**) Mouse0: Buttons: 9
(**) Option "CoreKeyboard"
(**) Generic Keyboard: Core Keyboard
seems like mouse is detected as 9-button mouse
daou
June 14th, 2007, 02:16 AM
You can always use xev to see if you are getting extra events when pressing buttons.
However, try changing the device option in your xorg.conf from "/dev/psaux" to "/dev/input/mice". Also, if that doesn't work try playing with the protocol options. I'll give you options for this later if the above doesn't work.
tim71
June 14th, 2007, 07:34 AM
Already tried - changed /dev/psaux to /dev/input/mice or (in my case) /dev/input/mouse1...
If I recall correctly, then I also tried to change protocol value from 'auto' to 'Explorer/PS2', but not 100% sure about that - have to check it up after work... Anyway - solution is yet to be found.
Nauxer
June 14th, 2007, 03:22 PM
Hello, I have this weird problem:
When I click the ''thumb forward'' button it comes out a right click, instead of whatever i have setted there.
Ill paste it here
# Thumb button forward.
Button
name = Thumb button forward
rawcode = 0x01011400
type = 0
keycode = KEY_RIGHT
mod1 = KEY_LEFTALT
EndButton
Thanks for your time, ubuntuforums is great, seems to have answers for everything.
gnyffel
June 14th, 2007, 08:29 PM
I'm posting info for a Logitech rx300, which is basically an ordinary optical mouse, except with scroll wheel tilt.
KaMZaTa
June 14th, 2007, 10:17 PM
I ask support for Logitech MX610. Tnks. Beautiful work!
liveforfunnow
June 14th, 2007, 10:32 PM
I would just like to say thanks to the developer of btnx. i absolutely LOVE the functionality! my MX Revolution worked immediately after installing, and the config file is a cinch.
thanks again!
daou
June 15th, 2007, 11:11 AM
Minor update: 0.2.9
Support for Logitech RX300
Fixed bug: zombie processes left by executing commands. Not a big problem unless you execute a lot of them. Forgot to include the zombie cleanup in 0.2.8, I was too eager to release it ;).
daou
June 15th, 2007, 11:16 AM
Already tried - changed /dev/psaux to /dev/input/mice or (in my case) /dev/input/mouse1...
If I recall correctly, then I also tried to change protocol value from 'auto' to 'Explorer/PS2', but not 100% sure about that - have to check it up after work... Anyway - solution is yet to be found.
I can't think of much else to try... but here is my xorg log:
(**) Option "Protocol" "auto"
(**) Mouse0: Device: "/dev/psaux"
(**) Mouse0: Protocol: "auto"
(**) Option "CorePointer"
(**) Mouse0: Core Pointer
(**) Option "Device" "/dev/psaux"
(**) Option "Buttons" "3"
(**) Option "Emulate3Buttons" "no"
(**) Option "ZAxisMapping" "4 5"
(**) Mouse0: ZAxisMapping: buttons 4 and 5
(**) Mouse0: Buttons: 9
It also actually recognizes 9 buttons. But it doesn't seem to be a problem for the MX Revo. If I come up with something, I'll post about it here.
Popcorn1959
June 15th, 2007, 12:10 PM
Any chance of getting support for MX500? Thank you.
daou
June 15th, 2007, 12:55 PM
I ask support for Logitech MX610. Tnks. Beautiful work! Any chance of getting support for MX500? Thank you.You will have to do the section marked "How to get support for mouse X?" in the first post of this thread. It's after the installation and troubleshooting sections.
It tells you how to get the data I need to support your mouse.
daou
June 15th, 2007, 01:12 PM
I'm probably going to make the GUI config app after all. However, it won't just be for configuring the mouse buttons. It will be a full blown mouse detection and configuration app. This means no more support requests will need to be made because it will detect what buttons you have (after pressing each button a couple of times). It will then allow you to configure each one of those buttons.
I might have something done by the end of next week. Then I'll need to get people to test it before I'm willing to integrate it into btnx. It will change btnx considerably and break the old system.
Hopefully it will be tested and releasable in a couple of weeks.
daou
June 15th, 2007, 01:14 PM
Hello, I have this weird problem:
When I click the ''thumb forward'' button it comes out a right click, instead of whatever i have setted there.
Ill paste it here
# Thumb button forward.
Button
name = Thumb button forward
rawcode = 0x01011400
type = 0
keycode = KEY_RIGHT
mod1 = KEY_LEFTALT
EndButton
Thanks for your time, ubuntuforums is great, seems to have answers for everything.
Does this happen without btnx? If you don't know, shutdown btnx with "/etc/init.d/btnx stop" and try pressing that button.
daou
June 15th, 2007, 01:16 PM
I would just like to say thanks to the developer of btnx. i absolutely LOVE the functionality! my MX Revolution worked immediately after installing, and the config file is a cinch.
thanks again!
No problem. I'm glad it's working and useful :D.
tim71
June 15th, 2007, 01:33 PM
It also actually recognizes 9 buttons. But it doesn't seem to be a problem for the MX Revo. If I come up with something, I'll post about it here.
It's obviously has nothing to to with btnx - if I can come up with the solution, which makes this mouse working like 3-button mouse without btnx, then the problem will be solved - maybe presence of the evdev has something to do with this...
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 additiomal keys - needs more testing though...
daou
June 15th, 2007, 01:53 PM
It's obviously has nothing to to with btnx - if I can come up with the solution, which makes this mouse working like 3-button mouse without btnx, then the problem will be solved - maybe presence of the evdev has something to do with this...
I looked at the xorg code yesterday... it's a monster, but I managed to find the part which handles the mouse. Here are the possible protocols:
static MouseProtocolRec mouseProtocols[] = {
/* Serial protocols */
{ "Microsoft", MSE_SERIAL, msDefaults, PROT_MS },
{ "MouseSystems", MSE_SERIAL, mlDefaults, PROT_MSC },
{ "MMSeries", MSE_SERIAL, mmDefaults, PROT_MM },
{ "Logitech", MSE_SERIAL, mlDefaults, PROT_LOGI },
{ "MouseMan", MSE_SERIAL, msDefaults, PROT_LOGIMAN },
{ "MMHitTab", MSE_SERIAL, mmhitDefaults, PROT_MMHIT },
{ "GlidePoint", MSE_SERIAL, msDefaults, PROT_GLIDE },
{ "IntelliMouse", MSE_SERIAL, msDefaults, PROT_IMSERIAL },
{ "ThinkingMouse", MSE_SERIAL, msDefaults, PROT_THINKING },
{ "AceCad", MSE_SERIAL, acecadDefaults, PROT_ACECAD },
{ "ValuMouseScroll", MSE_SERIAL, msDefaults, PROT_VALUMOUSESCROLL },
/* Standard PS/2 */
{ "PS/2", MSE_PS2, NULL, PROT_PS2 },
{ "GenericPS/2", MSE_PS2, NULL, PROT_GENPS2 },
/* Extended PS/2 */
{ "ImPS/2", MSE_XPS2, NULL, PROT_IMPS2 },
{ "ExplorerPS/2", MSE_XPS2, NULL, PROT_EXPPS2 },
{ "ThinkingMousePS/2", MSE_XPS2, NULL, PROT_THINKPS2 },
{ "MouseManPlusPS/2", MSE_XPS2, NULL, PROT_MMPS2 },
{ "GlidePointPS/2", MSE_XPS2, NULL, PROT_GLIDEPS2 },
{ "NetMousePS/2", MSE_XPS2, NULL, PROT_NETPS2 },
{ "NetScrollPS/2", MSE_XPS2, NULL, PROT_NETSCPS2 },
/* Bus Mouse */
{ "BusMouse", MSE_BUS, NULL, PROT_BM },
/* Auto-detect (PnP) */
{ "Auto", MSE_AUTO, NULL, PROT_AUTO },
/* Misc (usually OS-specific) */
{ "SysMouse", MSE_MISC, mlDefaults, PROT_SYSMOUSE },
/* end of list */
{ NULL, MSE_NONE, NULL, PROT_UNKNOWN }
};The serial mice, as I've understood it, are connected to a serial port so those probably won't be much use. But the Standard PS/2 and the Extended PS/2 mice might be of some use. Try the Standard PS/2 protocols first, because they have less functionality than the Extended PS/2 mice.
Make sure to check you xorg log to confirm that xserver is actually using that protocol, and not throwing an error and defaulting to something else.
But it could still be something else.
tim71
June 15th, 2007, 05:38 PM
It's not fully clear yet, but it seems, that I got rid of the most annoying side effect of using btnx with the configuration I have made - and it looks like lomoco did the trick.
Tinkering with the protocols doesn't change things much - extended protocols had no affect and standard protocols just lost the wheelscroll functionality.
tweak
June 16th, 2007, 02:51 AM
Thanks for the info! There is something strange with your mouse's Vendor and Product IDs. Either Microsoft is using vendor IDs illegally or your Ubuntu doesn't recognize it correctly. Vendor=0002 belongs to a company called Ingram. Your mouse should have Vendor=045e and Product=0047. I added both of these just in case. Tell me if it works.
Despite the bizzareness of the product and vendor ids, everything worked perfectly first try with 0.29 - thanks so much, it's been a damn nightmare to get copy and paste bound to my mouse since upgrading to 6.06 -> 6.10 and this was a cakewalk.
First attempt at configuration and it works perfectly. You're a champ! :) love yer work!
daou
June 17th, 2007, 04:58 AM
It's not fully clear yet, but it seems, that I got rid of the most annoying side effect of using btnx with the configuration I have made - and it looks like lomoco did the trick.
Tinkering with the protocols doesn't change things much - extended protocols had no affect and standard protocols just lost the wheelscroll functionality.
Actually, you can let btnx handle the wheelscrolls. This capability was added in v. 0.2.6, if I remember correctly. So if you are still having trouble, use one of the standard PS/2 protocols. Then define the wheelscroll button sections in btnx_config (uncomment them). Set keycode to either REL_WHEELFORWARD or REL_WHEELBACK.
daou
June 17th, 2007, 05:00 AM
Despite the bizzareness of the product and vendor ids, everything worked perfectly first try with 0.29 - thanks so much, it's been a damn nightmare to get copy and paste bound to my mouse since upgrading to 6.06 -> 6.10 and this was a cakewalk.
First attempt at configuration and it works perfectly. You're a champ! :) love yer work!
Good to hear! And I'm glad the config file was easy enough to get it working on your first try ;).
Chuck Norris
June 18th, 2007, 01:20 AM
Hello,
I have an MX-1000 mouse but for some reason btnx is not working for me. I followed your instructions in the FAQ to copy over the MX-1000 default config file and the config file is in the right place, but the buttons don't work. When I try to run btnx manually, it says Error: no supported mice detected. This is true after reinstallation as well.
my sudo gedit /etc/X11/xorg.conf says:
Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection
I did look at another guide, https://help.ubuntu.com/community/MX1000Mouse here, but the only step I took is install the packges.
sudo apt-get install xvkbd xbindkeys xmacro
sudo apt-get install xserver-xorg-input-evdev
I've used the synaptic package manager to uninstall all of the packages, but btnx still won't recognize my mouse.
When I run cat /proc/bus/input/devices:
I: Bus=0011 Vendor=0002 Product=0002 Version=000f
N: Name="PS2++ Logitech MX Mouse"
P: Phys=isa0060/serio1/input0
S: Sysfs=/class/input/input5
H: Handlers=mouse1 event5 ts1
B: EV=7
B: KEY=ff0000 0 0 0 0 0 0 0 0
B: REL=143
Would you have any idea what I'm doing wrong?
daou
June 18th, 2007, 01:47 AM
It looks like you aren't doing anything wrong. Does your mouse use something other than a USB cable to connect to the computer? It looks like it it's connected to a normal PS/2 port. This seems to have the side effect of not producing the correct Vendor ID and Product ID values, which btnx needs, currently. Once the GUI config app for btnx is released (2-3 weeks?), your mouse should work with btnx as well.
tim71
June 18th, 2007, 03:46 AM
...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 additiomal keys - needs more testing though...Had to add this line to /etc/rc.local because it needs to be re-applied after restart.
Chuck Norris
June 18th, 2007, 05:00 AM
It looks like you aren't doing anything wrong. Does your mouse use something other than a USB cable to connect to the computer? It looks like it it's connected to a normal PS/2 port. This seems to have the side effect of not producing the correct Vendor ID and Product ID values, which btnx needs, currently. Once the GUI config app for btnx is released (2-3 weeks?), your mouse should work with btnx as well.
When I bought the mouse it came with a USB<->PS/2 adapter, and I used it because I didn't see the need to use a USB port for the mouse. But I removed the adapter, connecting the mouse to USB and rebooted my computer and now it recognizes my mouse. This is a real treat, thank you.
Edit: Also, good luck with the GUI. While I'm still fairly new to linux/ubuntu, I'm quite experienced with Windows (~9 years gaming, forum posting, file sharing?). I find the terminal to be very powerful but also rather unforgiving. So perhaps I'm a little stuck on GUIs, but I've always liked them more than, say, trying to recover a broken windows installation in DOS. T_T
mect
June 19th, 2007, 01:11 AM
I would love it if you can get the logitech mediaplay mouse working with this. I've tried using the lmpcm route for over a year, and while I've made some progress, I've never gotten the whole thing functional. While I've used linux off and on for quite a while, I still am very much in the learning stage, so hopefully I've attached everything you need. If not, let me know and I try again.
Thanks.
daou
June 19th, 2007, 11:16 AM
I would love it if you can get the logitech mediaplay mouse working with this. I've tried using the lmpcm route for over a year, and while I've made some progress, I've never gotten the whole thing functional. While I've used linux off and on for quite a while, I still am very much in the learning stage, so hopefully I've attached everything you need. If not, let me know and I try again.
Thanks.
Thanks for hexdumping, mect. You gave me all the info I needed.
btnx-0.2.10 now supports Logitech Mediaplay mice. Make sure to check the FAQ section first, your mouse has the same problem (small one, though) as Logitech MX-1000. This won't be a problem anymore once the GUI config app is released.
I hope btnx will do the trick for you ;). And if you have any problems with btnx, post back here. I'd like to know that the configuration file I made is functional.
daou
June 19th, 2007, 11:18 AM
When I bought the mouse it came with a USB<->PS/2 adapter, and I used it because I didn't see the need to use a USB port for the mouse. But I removed the adapter, connecting the mouse to USB and rebooted my computer and now it recognizes my mouse. This is a real treat, thank you.
Edit: Also, good luck with the GUI. While I'm still fairly new to linux/ubuntu, I'm quite experienced with Windows (~9 years gaming, forum posting, file sharing?). I find the terminal to be very powerful but also rather unforgiving. So perhaps I'm a little stuck on GUIs, but I've always liked them more than, say, trying to recover a broken windows installation in DOS. T_T
No problem. The reason I am making the GUI is because it will add some powerful functionality for btnx. But as an added bonus, it will make configuration easier (not necessarily faster, though).
RVDowning
June 19th, 2007, 01:07 PM
A GUI front end? What could possibly be next!!!! I want it to make coffee. :)
daou
June 19th, 2007, 02:30 PM
A GUI front end? What could possibly be next!!!! I want it to make coffee. :)
You're thinking too small. It will also clean your house, take out the dog (cat, boa, whatever) and pay your taxes :D:D.
andrewPCT
June 19th, 2007, 09:12 PM
Logitech MX500 data has been private messaged.
daou
June 20th, 2007, 10:42 AM
btnx-0.2.11 adds support for Logitech MX-500 & MX-310.
daou
June 20th, 2007, 10:49 AM
Logitech MX500 data has been private messaged.
Thanks for hexdumping the mice. If you have trouble with the paste action, make sure you don't have any previous custom configurations for your mouse (like the configuration from the Logitech Mice howto). Also, if you have trouble, make sure your xorg.conf looks like the one described in the troubleshooting section.
I'm a bit concerned about the cruise control buttons on the MX-500. They send a couple events, one which I haven't seen any other mouse give before. One problem is that the cruise control gives it's own button event and a scroll event. This means that if you define that button, you will always get a scroll event as well. I don't think it's possible to change this behavior (not yet, at least. This would need a coupe changes in btnx and a few changes in your xorg.conf file). If you want, you could make the cruise control send another wheel scroll event, this way the cruise control buttons will scroll twice as fast as the mouse wheel itself.
andrewPCT
June 20th, 2007, 05:50 PM
Thanks, it works great (for the most part, the other part I blame on the mouse).
Using the MX500, I have changed the side buttons (Forward, Back) to Alt-Left, Alt-Right for use in the browser. Problem is that every time I use the Forward button, the right-click context menu appears (after going forward in the history). And Back is pasting before it performs the action. I'm not sure if it tired the other config guides, so I'm going to glance at them to see if I might have made any of those changes.
Just removed some changes I've made with the other attempts, the pasting/context menu still appears.
snapcase16
June 21st, 2007, 05:45 PM
I'm having some trouble using btnx with a Logitech MX Revolution and Ubuntu 7.04.
When I run:
$ sudo /etc/init.d/btnx stop
$ sudo /usr/sbin/btnx
I receive:
Detected mouse: mxrevo Vendor=046d Product=c51a
Device and event handler detection complete.
-Using event: event3
Error opening button event file descriptor"event3": No such file or directory
My xorg.conf is as follows:
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "auto"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "no"
EndSection
I previously modified my xorg while following another howto for a prior mouse, but I can't remember what else I did. The mouse functions as a normal mouse, but none of the extra buttons are functioning. I'm not sure what to do next and any help would be greatly appreciated. Thanks in advance!
gongzero
June 21st, 2007, 08:11 PM
Thanks SO much for btnx!
I've been using 0.2.9 with my MX Revolution and tonight decided to try modifying my config file. Specifically, I remapped the thumb wheel functionality and the thumb forward/back buttons.
They all work fine except for the thumb forward button, which I want to map to an F5 (reload page in Firefox). Here's the relevant section from btnx_config:
# Thumb button forward.
# Does an F5. Useful for refreshing a web page.
# (Firefox, gnome-terminal, etc.)
Button
name = Thumb button forward
rawcode = 0x01011400
type = 0
keycode = KEY_F5
mod1 = NONE
EndButton
What this seems to do is refresh the page and send a right-click event at the same time. I tried mapping it to CTRL-R instead (same function), but that didn't fix anything; I also upgraded my btnx installation to 0.2.11 and kept the old config file, to no avail.
Any ideas?
-A
tim71
June 22nd, 2007, 12:00 AM
I'm a bit concerned about the cruise control buttons on the MX-500. They send a couple events, one which I haven't seen any other mouse give before. One problem is that the cruise control gives it's own button event and a scroll event. This means that if you define that button, you will always get a scroll event as well. I don't think it's possible to change this behavior.
It can be the same problem, which I was stuck with - "smartscroll" or "cruise" or whatever it's named.
I got rid of it simply.
sudo apt-get install lomoco
sudo lomoco --no-sms
and after that I added following into /etc/rc.local before the 'exit 0' line for this same thing to be applied on every boot ( dirty, but works :D )
lomoco --no-sms
P.S. This paste event thing is also happening here with MX1000 on middle thumb button, but this is a smaller problem than this scroll event thing.
tim71
June 22nd, 2007, 12:15 AM
By the way... with this pidfile missing thing I looked into /etc/init.d/btnx
and changed
start-stop-daemon --start --background --quiet --pidfile $PIDFILE --exec $DAEMON -- \
$DAEMON_ARGS \
|| return 2
to
start-stop-daemon --start --background --quiet --make-pidfile --pidfile $PIDFILE --exec $DAEMON -- \
$DAEMON_ARGS \
|| return 2
pidfile appeared as it should after that and also startup and shutdown of the btnx daemon is quicker...
confed16
June 24th, 2007, 12:59 AM
P.S. This paste event thing is also happening here with MX1000 on middle thumb button, but this is a smaller problem than this scroll event thing.
I am having the same issue with the MX1000 center button also sending the "paste" command. It's driving me nuts! Anyone have any thoughts on how to fix this? Lomoco --no-sms worked great for fixing the scroll event!
daou
June 25th, 2007, 10:18 AM
I'm having some trouble using btnx with a Logitech MX Revolution and Ubuntu 7.04.
...
I previously modified my xorg while following another howto for a prior mouse, but I can't remember what else I did. The mouse functions as a normal mouse, but none of the extra buttons are functioning. I'm not sure what to do next and any help would be greatly appreciated. Thanks in advance!
Make sure you don't have any old udev rules from the previous configuration. Someone else had a similar problem and it was caused by an old udev rule. If you can still find the howto for your old configuration, go through it step by step, undoing everything you did.
daou
June 25th, 2007, 10:29 AM
To anyone having problems with additional button events, go through these steps:
1. Make sure you have undone every part of a previous configuration (if any).
2. For extra scroll events, try tim71's advice: lomoco.
3. If nothing else works, try remapping that button with xmodmap. First you need to use xev to find out what button is recognized by xserver. Run xev and press that button in the xev window. Look carefully and see if a "Button#" event was raised by xev. Let's say that button number was 6. Replace that with xmodmap, preferably using a higher number. For example,
xmodmap -e "pointer = 1 2 3 4 5 9 7 8 6"
would send a button9 event instead when pressing that button. Hopefully button9 isn't mapped to anything, otherwise you would get that event instead.
If that works, add the line "pointer = 1 2 3 4 5 9 7 8 6" without quotes to your ~/.Xmodmap file, then it will launch that command everytime you start X.
daou
June 25th, 2007, 10:30 AM
By the way... with this pidfile missing thing I looked into /etc/init.d/btnx
and changed
...
pidfile appeared as it should after that and also startup and shutdown of the btnx daemon is quicker...
Thanks for looking that up. I didn't have time to fix that yet. I'll add it to the next btnx update.
Ethekyel
June 26th, 2007, 08:15 PM
You nailed it, thank you so much!
I'm using MX Revolution and everything works OK. However I did make some changes to the config. The only problem I get is when I use thumb button forward, which I configured this way:
# Thumb button forward.
# Does an Alt+Right. Ex. Firefox forward
Button
rawcode = 0x01011400
type = 0
keycode = KEY_RIGHT
mod1 = KEY_LEFTALT
EndButton
It does go forward, but it displays the window menu (close, move, resize...) where the pointer is after clicking forward. It's weird, because back is configured the same way and it doesn't have any issues. Do you know how to solve this?
Thanks again.
snapcase16
June 27th, 2007, 01:10 AM
I fixed my aforementioned problem by clearing out the old udev rules as was suggested. However, now I seem to have a new problem. When I have multiple tabs open and close the rightmost tab, the mouse occasionally highlights the website in the tab to the left. It does so until I click on an area of the affected site. Anyone have any ideas?
casell
June 27th, 2007, 04:27 PM
Hi you saved the day!
I own a MX610 and i tried to make btnx work
got to add:
{ "mx610", 0x046D, 0xC518 }, // Logitech MX-610
to device.c and used the attached configuration file! (got to add .txt to upload, remove it)
Thanks a lot for you good work, if you need help for new releases and for testing just ask!
daou
June 27th, 2007, 04:59 PM
You nailed it, thank you so much!
I'm using MX Revolution and everything works OK. However I did make some changes to the config. The only problem I get is when I use thumb button forward, which I configured this way:
# Thumb button forward.
# Does an Alt+Right. Ex. Firefox forward
Button
rawcode = 0x01011400
type = 0
keycode = KEY_RIGHT
mod1 = KEY_LEFTALT
EndButtonIt does go forward, but it displays the window menu (close, move, resize...) where the pointer is after clicking forward. It's weird, because back is configured the same way and it doesn't have any issues. Do you know how to solve this?
Thanks again.
Someone else had a problem with the menu popping up with a different mouse as well. I can't replicate it myself. I'm not sure what could be the possible cause, other than it's probably an xorg.conf or some other mouse config setting.
daou
June 27th, 2007, 05:12 PM
Hi you saved the day!
I own a MX610 and i tried to make btnx work
got to add:
{ "mx610", 0x046D, 0xC518 }, // Logitech MX-610
to device.c and used the attached configuration file! (got to add .txt to upload, remove it)
Thanks a lot for you good work, if you need help for new releases and for testing just ask!
Wow! At this pace I'll be out of work ;). I take it the code wasn't too difficult to figure out.
But no problem, I'm glad you find btnx useful. I might just take you up on that testing offer when I release the btnx-config app. There's still quite a lot of work to be done (SVN repo is at http://svn.ollisalonen.com/btnx-config but the program is not yet fully functional).
Thanks for doing all the hexdumping work and editing the config file. I'll add it to the next update. Unfortunately it seems the VX Revolution and MX-610 also share product IDs, so the config file will have to be copied manually like for the MX-1000 and Mediaplay mice.
This is one thing I don't understand. Logitech can define up to 65535 unique product IDs for their USB devices, but they keep reusing the same ones. Even if they made 1000 unique USB devices a year, they could wrap around to the oldest IDs after 65 years. At that point there probably won't be any functioning devices left that are using the reused IDs.
Maybe they are using some common USB controller/transceiver setup and flashing unique IDs wouldn't be cost effective. But that just seems a bit far fetched.
Mack1
June 27th, 2007, 06:09 PM
Dauo, just to let you know....im still loving btnx and im still greatly thankfull for your
help to the community.
<---in love lol
Mack1
Bedpan.ca
June 28th, 2007, 11:17 PM
I've been having this problem where (when btnx is running) my mouse will send the Right-Tilt action on it's own.
I've just finished going through the process of getting a replacement mouse, in hopes that it was a faulty mouse, but this one does the same thing as the last.
Anyone have any ideas of what could be causing this?
I'm running Feisty Kubuntu 7.04 with a dual core AMD processor (AMD64), and the latest version of btnx.
Thanks,
James
daou
June 29th, 2007, 11:46 AM
I've been having this problem where (when btnx is running) my mouse will send the Right-Tilt action on it's own.
I've just finished going through the process of getting a replacement mouse, in hopes that it was a faulty mouse, but this one does the same thing as the last.
Anyone have any ideas of what could be causing this?
I'm running Feisty Kubuntu 7.04 with a dual core AMD processor (AMD64), and the latest version of btnx.
Thanks,
James
Sorry, I completely forgot about this. I attached a debugging version. It will tell you whenever btnx sends an event, and what keycodes and modifiers it sends.
Also, whenever you get a sidescroll event, it will inform you about it and do a hexdump of the data related to that event. Send me that data (whenever you get an unwanted sidescroll event).
EDIT: you don't have to install it if you already have btnx installed. Just stop the old btnx first. Then run make and sudo ./btnx
daou
June 29th, 2007, 11:57 AM
Dauo, just to let you know....im still loving btnx and im still greatly thankfull for your
help to the community.
<---in love lol
Mack1
No, thank you for helping me release btnx to the community and believing in btnx from day 1 :D.
kaio1000
June 29th, 2007, 04:35 PM
hi all.. my first post on this thread...after searching a way to configure my mx310 i've seen this helpful topic.. everything went ok until configuration... i've configured btnx config as u can see here:
# Do not change the vendor_name or product_name values
vendor_name = Logitech
product_name = MX-310
# 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
# Wheel scroll down
# NOTE: This is commented out. You probably don't want
# to send extra events when pressing this button!
#Button
#name = Wheel scroll down
#rawcode = 0x020008FF
#type = 1
#keycode = KEY_UNKNOWN
#EndButton
# Wheel scroll up
# NOTE: This is commented out. You probably don't want
# to send extra events when pressing this button!
#Button
#name = Wheel scroll up
#rawcode = 0x02000800
#type = 1
#keycode = KEY_UNKNOWN
#EndButton
# Side button back
# Tasto Freccia SX + ALT SX.
Button
rawcode = 0x01011300
type = 0
keycode = KEY_LEFTALT
mod1 = KEY_LEFT
EndButton
# Side button forward
# Tasto Freccia DX + ALT SX.
Button
rawcode = 0x01011400
type = 0
keycode = KEY_LEFTALT
mod1 = KEY_RIGHT
EndButton
# App button
# Tasto Alt+Tab
Button
rawcode = 0x01011500
type = 0
keycode = KEY_LEFTALT
mod1 = KEY_TAB
EndButton
but it doesnt work fine... when i push left or right button on my mx310, the system do the combo alt+left(or right) but it do also another thing...in my case.. when i try alt+left (with left mouse button) in firefox it open also my download manager to download parts of page, when i try alt+right it open also a drop-down menu...when i use app button system copy link and paste it where it can... can anybody help me? where i wrong?
PS: sry for my english..but i speak a bit of it ;) and thanks to daou for his work.
Bedpan.ca
June 29th, 2007, 06:59 PM
I attached a debugging version. It will tell you whenever btnx sends an event, and what keycodes and modifiers it sends.
you don't have to install it if you already have btnx installed. Just stop the old btnx first. Then run make and sudo ./btnx
warning: i386 architecture is incompatible with i386:x86-64 output
Doesn't let me make it, on my 64bit system :(
daou
June 30th, 2007, 03:58 AM
warning: i386 architecture is incompatible with i386:x86-64 outputDoesn't let me make it, on my 64bit system :(
Ok, my bad. I just packaged the source folder on my computer and forgot to run make clean :rolleyes:. You need to get rid of the compiled files.
So run "make clean" first, then "make".
daou
June 30th, 2007, 04:04 AM
hi all.. my first post on this thread...after searching a way to configure my mx310 i've seen this helpful topic.. everything went ok until configuration... i've configured btnx config as u can see here:
but it doesnt work fine... when i push left or right button on my mx310, the system do the combo alt+left(or right) but it do also another thing...in my case.. when i try alt+left (with left mouse button) in firefox it open also my download manager to download parts of page, when i try alt+right it open also a drop-down menu...when i use app button system copy link and paste it where it can... can anybody help me? where i wrong?
PS: sry for my english..but i speak a bit of it ;) and thanks to daou for his work.
It looks like a problem some other users are having as well. Check this post (http://ubuntuforums.org/showpost.php?p=2910234&postcount=208).
rzj
June 30th, 2007, 08:49 AM
Logitech Cordless Click Plus - more usable with btnx "out of the box" than any of the other systems I've tried. btnx thinks it's an mx600.
Seems to work fine for left, right, middle (scroll click), back and forward buttons.
ATM tilt left/right also map to back/forward respectively, and there is a little button on the top is equivalent to middle click (Logitech use to pop up a quick window selector by default in windows).
I have been trying various other howto's so there may be some other activity going on that makes these functions overlap.
When I run btnx from the command line I get
Detected mouse: mx600 Vendor=046d Product=c50e
Did not find additional event handlers. No problem.
Device and event handler detection complete.
-Using event: event2
Opened handler: /dev/input/event2
Opened handler: /dev/input/uinput
Opened handler: /dev/input/uinput
No startup errors
Hex dump attached.
Ray
daou
June 30th, 2007, 09:19 AM
Logitech Cordless Click Plus - more usable with btnx "out of the box" than any of the other systems I've tried. btnx thinks it's an mx600.
Seems to work fine for left, right, middle (scroll click), back and forward buttons.
ATM tilt left/right also map to back/forward respectively, and there is a little button on the top is equivalent to middle click (Logitech use to pop up a quick window selector by default in windows).
I have been trying various other howto's so there may be some other activity going on that makes these functions overlap.
When I run btnx from the command line I get
Detected mouse: mx600 Vendor=046d Product=c50e
Did not find additional event handlers. No problem.
Device and event handler detection complete.
-Using event: event2
Opened handler: /dev/input/event2
Opened handler: /dev/input/uinput
Opened handler: /dev/input/uinput
No startup errors
Hex dump attached.
Ray
It has the same problem as the MX1000, MX610, and MX600 because they all use the same product IDs. That's why btnx thinks its an MX600. Not really a problem, the right configuration file just has to be copied after installation.
And if you have configured your mouse before, it will cause some problems. The troubleshooting section has some possible solutions for that.
The mouse wheel click seems to send a lot button presses sometimes. But you probably don't want btnx to handle that anyway, so it shouldn't be a problem.
But I'll look at this more later (maybe tomorrow), when I have more time.
rzj
June 30th, 2007, 11:02 AM
It has the same problem as the MX1000, MX610, and MX600 because they all use the same product IDs.
I presume the product ID is actually the RF USB device. On Windows the Logitech software can tell what device(s) is/are connected to the wireless receiver in so it must have some means of interrogating the input device itself to identify it.
I wonder if it would be possible to capture the data that is used by the windows software with some kind of USB traffic sniffer, and then clone it in your software.
But I'll look at this more later (maybe tomorrow), when I have more time.
Thanks,
Ray
daou
June 30th, 2007, 11:13 AM
I presume the product ID is actually the RF USB device. On Windows the Logitech software can tell what device(s) is/are connected to the wireless receiver in so it must have some means of interrogating the input device itself to identify it.
This is probably correct. And it's most likely a proprietary protocol.
I wonder if it would be possible to capture the data that is used by the windows software with some kind of USB traffic sniffer, and then clone it in your software.
Thanks,
RayLinux machines need a custom kernel to sniff USB traffic (at least Ubuntu distros). The best way to go about it would be to sniff the USB traffic on a Windows machine with SetPoint software installed.
However, it's all the same to btnx, because btnx would need to be a kernel module to accomplish this. I'm not sure though, it might be possible to talk with the mouse through the USB interface library in user space, but even this might be troublesome because of the closed protocols involved.
Not that this matters once btnx-config is released. It's getting quite close to a state where it can be released for testing.
Fangs404
June 30th, 2007, 03:28 PM
This looks really neat. I'm excited as the proud owner of an MX Revolution.
I have 1 quick question, though. I browsed through your SVN repository, and there're many more recent tags than 0.2.11 (the latest in SVN is 0.2.8), yet I'm only seeing a tar for 0.2.11, and 0.2.11 is listed as the most recent version on http://ollisalonen.com/btnx.html. Is 0.2.8 usable and you forgot to tar it up, or should we stick with 0.2.11?
Thanks! I'm excited to try this out.
daou
June 30th, 2007, 04:51 PM
This looks really neat. I'm excited as the proud owner of an MX Revolution.
I have 1 quick question, though. I browsed through your SVN repository, and there're many more recent tags than 0.2.11 (the latest in SVN is 0.2.8), yet I'm only seeing a tar for 0.2.11, and 0.2.11 is listed as the most recent version on http://ollisalonen.com/btnx.html. Is 0.2.8 usable and you forgot to tar it up, or should we stick with 0.2.11?
Thanks! I'm excited to try this out.
0.2.11 (eleven) is the newest one. Go ahead and have fun with it!
Fangs404
June 30th, 2007, 05:29 PM
0.2.11 (eleven) is the newest one. Go ahead and have fun with it!
Oh, haha, duh! I was off (I was looking at 8 vs 1 instead of 8 vs 11). :)
[edit]
And by the way, this is fantastic. It does pretty much everything I'd like. Thanks!
Bedpan.ca
June 30th, 2007, 08:54 PM
Ok, my bad. I just packaged the source folder on my computer and forgot to run make clean :rolleyes:. You need to get rid of the compiled files.
So run "make clean" first, then "make".
jman@Bedpan:~/Programs/btnx-debug$ sudo ./btnx
Detected mouse: mxrevo Vendor=046d Product=c51a
Device and event handler detection complete.
-Using event: event3
Opened handler: /dev/input/event3
Opened handler: /dev/input/event4
Opened handler: /dev/input/uinput
Opened handler: /dev/input/uinput
No startup errors
Interpreted a sidescroll! Here is the hexdump:
f3bf 4686 0000 0000 a1f2 0006 0000 0000
0002 0000 fff2 ffff f3bf 4686 0000 0000
a202 0006 0000 0000 0000 0000 0000 0000
Got rawcode: 0x02000600
Sending event: key=0x006a mod1==0x0038 mod2==0x0000 mod3==0x0000
^[[1;3C
jman@Bedpan:~/Desktop$ sudo ~/Programs/btnx-debug/btnx
Detected mouse: mxrevo Vendor=046d Product=c51a
Device and event handler detection complete.
-Using event: event3
Opened handler: /dev/input/event3
Opened handler: /dev/input/event4
Opened handler: /dev/input/uinput
Opened handler: /dev/input/uinput
No startup errors
Interpreted a sidescroll! Here is the hexdump:
2abc 4687 0000 0000 e902 0006 0000 0000
0002 0000 0008 0000 2abc 4687 0000 0000
e90b 0006 0000 0000 0000 0000 0000 0000
Got rawcode: 0x02000600
Sending event: key=0x006a mod1==0x0038 mod2==0x0000 mod3==0x0000
^[[1;3CInterpreted a sidescroll! Here is the hexdump:
2acd 4687 0000 0000 3d02 0006 0000 0000
0002 0000 0011 0000 2acd 4687 0000 0000
3d04 0006 0000 0000 0002 0001 0001 0000
2acd 4687 0000 0000 3d0e 0006 0000 0000
0000 0000 0000 0000
Got rawcode: 0x02000600
Sending event: key=0x006a mod1==0x0038 mod2==0x0000 mod3==0x0000
^[[1;3CInterpreted a sidescroll! Here is the hexdump:
2aef 4687 0000 0000 34f5 0006 0000 0000
0002 0000 ffee ffff 2aef 4687 0000 0000
34f8 0006 0000 0000 0002 0001 fffe ffff
2aef 4687 0000 0000 3502 0006 0000 0000
0000 0000 0000 0000
Got rawcode: 0x02000600
Sending event: key=0x006a mod1==0x0038 mod2==0x0000 mod3==0x0000
^[[1;3C
All I was doing was moving the mouse around. No scrolling, or other buttons.
imperialline
June 30th, 2007, 10:32 PM
Hi daou,
Btnx is great. It is exactly what I need when I was looking around trying to configure my MX Revolution. However, I have one peculiar issue: Sometimes when I move my mouse around, I see something like "^[[3C" on my terminal. Apparently, some people having the same issue as mine except that they somehow accidentally click on the wheel left or right. In case, I do not click on any wheel or button, I just move the mouse from one window to another window. Also, this is rather random and underministic.
Thanks,
I
Bedpan.ca
June 30th, 2007, 11:17 PM
Hi daou,
Btnx is great. It is exactly what I need when I was looking around trying to configure my MX Revolution. However, I have one peculiar issue: Sometimes when I move my mouse around, I see something like "^[[3C" on my terminal. Apparently, some people having the same issue as mine except that they somehow accidentally click on the wheel left or right. In case, I do not click on any wheel or button, I just move the mouse from one window to another window. Also, this is rather random and underministic.
Thanks,
I
By any chance are you running a 64bit copy of Ubuntu?
imperialline
June 30th, 2007, 11:57 PM
By any chance are you running a 64bit copy of Ubuntu?
As a matter of fact, I do. This is the output from uname:
Linux sanjose 2.6.15-28-amd64-generic #1 SMP PREEMPT Thu May 10 09:46:40 UTC 2007 x86_64 GNU/Linux
Bedpan.ca
July 1st, 2007, 12:02 AM
As a matter of fact, I do. This is the output from uname:
Linux sanjose 2.6.15-28-amd64-generic #1 SMP PREEMPT Thu May 10 09:46:40 UTC 2007 x86_64 GNU/Linux
Yeah, I was thinking as much. I'm betting there's a bug with the 64 bit version of btnx, since I have the same problem (randomly sending the right-tilt button, which is default set to ALT+RIGHT, which prints a capital C, and some gibberish).
I'm hoping daou will be sorting out this matter soon.
imperialline
July 1st, 2007, 12:13 AM
If it is 64-bit specific issue, I would imagine that this is not too complicated for daou to fix it.
This app is great, much better than using edev, xkbset, xbinkey, xvkbd, etc. such a mess!
daou
July 1st, 2007, 05:01 AM
Thanks, Bedpan, for being patient. This newer attached debug version should fix the 64-bit bug, while still being compatible with 32-bit OSs.
Try it and let me know if it fixes the issue. I will release a new btnx version if it does.
Quick reminder:
run "make" (I think I remembered to run make clean this time ;))
stop btnx first! "sudo /etc/init.d/btnx stop"
then "sudo ./btnx"
daou
July 1st, 2007, 05:14 AM
Oh, haha, duh! I was off (I was looking at 8 vs 1 instead of 8 vs 11). :)
[edit]
And by the way, this is fantastic. It does pretty much everything I'd like. Thanks!
No problem. I'm glad you like it. After all, an MX Revo without functionality on its buttons is like a Ferrari without wheels. It looks, feels, and sounds nice, but doesn't go anywhere ;).
daou
July 1st, 2007, 05:24 AM
If it is 64-bit specific issue, I would imagine that this is not too complicated for daou to fix it.
This app is great, much better than using edev, xkbset, xbinkey, xvkbd, etc. such a mess!
The problem with 64-bit was that it changed the most important part of btnx-> the size and data of the input device output that btnx reads. Hopefully nothing else breaks it in the future (like a complete rework of the kernel input interface ).
You can also try the debugging version I attached for Bedpan, and see if it fixes the issue.
I'm glad you find btnx useful (and hopefully easy). I was afraid of making just another complicated process for configuring mice, something that btnx was supposed to fix. The old MX Revo howto that I maintained got so bloated that I programmed btnx so I wouldn't have to go through the old howto again after the Feisty update :D.
daou
July 1st, 2007, 07:30 AM
This testing phase is over. Go here for the newer one: http://ubuntuforums.org/showpost.php?p=2974765&postcount=282
imperialline
July 1st, 2007, 12:46 PM
The problem with 64-bit was that it changed the most important part of btnx-> the size and data of the input device output that btnx reads. Hopefully nothing else breaks it in the future (like a complete rework of the kernel input interface ).
You can also try the debugging version I attached for Bedpan, and see if it fixes the issue.
I'm glad you find btnx useful (and hopefully easy). I was afraid of making just another complicated process for configuring mice, something that btnx was supposed to fix. The old MX Revo howto that I maintained got so bloated that I programmed btnx so I wouldn't have to go through the old howto again after the Feisty update :D.
Thanks daou. I will give it a go and keep you posted.
imperialline
July 1st, 2007, 02:17 PM
Thanks daou. I will give it a go and keep you posted.
Yep, it does not seem to send something like "^[[3C" randomly any more.
However, it seems that now and then the thumb buttons send an extra button2 events
Bedpan.ca
July 1st, 2007, 02:24 PM
Yep, it does not seem to send something like "^[[3C" randomly any more.
However, it seems that now and then the thumb buttons send an extra button2 events
Yeah, I've been testing the second debug version for about an hour now, and it seems to have fixed the random right-tilt problem.
As for the extra thumb button events, I thought the same thing at first too, but now I'm pretty confident that it's just the crazy sensitive button itself, and not btnx. For my forward-thumbwheel, I just have to pretty much breathe on the button to make it go. The reverse-thumbwheel button isn't as sensitive though.
I'm satisfied.
imperialline
July 1st, 2007, 02:27 PM
Yeah, I've been testing the second debug version for about an hour now, and it seems to have fixed the random right-tilt problem.
As for the extra thumb button events, I thought the same thing at first too, but now I'm pretty confident that it's just the crazy sensitive button itself, and not btnx. For my forward-thumbwheel, I just have to pretty much breathe on the button to make it go. The reverse-thumbwheel button isn't as sensitive though.
I'm satisfied.
Me too, can't complain. Great works - daou is a hero
rzj
July 1st, 2007, 06:27 PM
Just downloaded the btnx-config program
it crashes during my left button clicking when the progress bar is full - I presume it means to keep clicking the button?
Output to terminal attached.
Ray
tim71
July 2nd, 2007, 09:51 AM
Today I noticed one thing - if framebuffer resolution is forced at boot to some value in /boot/grub/menu.lst
for example
#defoptions=vga=791
then all seems to be fine - btnx process is running etc. but btnx events would not work until reboot without this framebuffer option (means that GRUB menu file has to be re-edited)
daou
July 2nd, 2007, 12:03 PM
Just downloaded the btnx-config program
it crashes during my left button clicking when the progress bar is full - I presume it means to keep clicking the button?
Output to terminal attached.
Ray
I can't seem to reproduce this problem. Does it happen every time for you? 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.
daou
July 2nd, 2007, 12:16 PM
Glad to hear the 64-bit problem is fixed. The fix has been added to the test version of btnx-config (v.0.1.1). I will update btnx itself soon with the fix.
daou
July 2nd, 2007, 12:18 PM
Today I noticed one thing - if framebuffer resolution is forced at boot to some value in /boot/grub/menu.lst
for example
#defoptions=vga=791then all seems to be fine - btnx process is running etc. but btnx events would not work until reboot without this framebuffer option (means that GRUB menu file has to be re-edited)
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?
daou
July 2nd, 2007, 12:48 PM
btnx-0.2.12 adds the following:
Bug fix for 64-bit versions. No more unwanted sidescrolls. Thanks Bedpan and imperialline for helping to get it fixed.
Bug fix for missing pidfile. btnx now stops and restarts faster. Thanks to tim71 for suggesting this.
Added support for MX-610 (check FAQ section). Thanks to casell for doing all the work ;).EDIT: forgot to add support for Cordless Click Plus... will be supported soon.
Bedpan.ca
July 2nd, 2007, 12:55 PM
Glad to hear the 64-bit problem is fixed. The fix has been added to the test version of btnx-config (v.0.1.1). I will update btnx itself soon with the fix.
btnx-config now works on my 64bit system.
A thought though: since its a mouse-config tool, it should be usable by keyboard only.
Instead of having to click buttons in btnx-config with my mouse, the program should be able to accept input from the keyboard (and select the most appropriate button for the current function), so that the user only needs to hit spacebar, or some other designated key. And you should be able to see what button or other gui-ness has focus, when tabbing through.
Also:jman@Bedpan:~/Programs/btnx-config-0.1.1$ sudo ./btnx-config
Warning: invalid button index reported by buttons_check_index.
Error: could not load program logo.
No previous config file at /etc/btnx/btnx_config_test. No configuration loaded.
Warning: tree_buttons_empty_store could not get an iter.
freed all!
Produced by simply launching, and then closing the program.
vBulletin® v3.8.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.