Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Logitech MX Revolution - Scroll Wheel Behavior
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
jk3us
Apprentice
Apprentice


Joined: 14 Mar 2005
Posts: 201
Location: Memphis, TN

PostPosted: Sun Oct 01, 2006 10:47 pm    Post subject: [SOLVED] Logitech MX Revolution - Scroll Wheel Behavior Reply with quote

I'm quite suprised I can't find any discussion on this here (or anywhere)....

I just got the Logitech MX Revolution Mouse, and have most of the buttons working. The big problem I'm having is the scroll wheel. The default behavior of a scroll wheel click is to switch the wheel from "click-to-click" mode to the hyperspeed scroll mode, not sending any events to the computer. This alone is almost a deal breaker for me; the middle click is my best friend.

Under windows, using Logitech's SetPoint Software, you can change the behavior of clicking the scroll wheel (windows actually sends some commands to change how the mouse physically and electronically acts, not just contol how the OS responds to events sent from the mouse). Has anyone figured out how to get that same control in linux?


Last edited by jk3us on Tue Nov 28, 2006 1:03 am; edited 2 times in total
Back to top
View user's profile Send private message
jk3us
Apprentice
Apprentice


Joined: 14 Mar 2005
Posts: 201
Location: Memphis, TN

PostPosted: Mon Oct 02, 2006 7:01 pm    Post subject: Reply with quote

Anyone? Does anyone have this and use it in linux? How do you get by with no middle click / paste button?
Back to top
View user's profile Send private message
johoe
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jun 2005
Posts: 92

PostPosted: Mon Oct 02, 2006 10:39 pm    Post subject: Reply with quote

I've got this mouse and have the same behavior. Maybe you can try it with the "mouse" driver and Emulate3Buttons or you can remap the "search button" to emulate a middle click.

Also see my post: http://forums.gentoo.org/viewtopic-t-502426-highlight-revolution.html - I would be interessted in your config files...

johoe
Back to top
View user's profile Send private message
jk3us
Apprentice
Apprentice


Joined: 14 Mar 2005
Posts: 201
Location: Memphis, TN

PostPosted: Tue Oct 03, 2006 3:34 am    Post subject: Reply with quote

Using the search button as middle click wouldn't be so bad... but right now that button is sending a keycode event (keycode 122). How would I go about mapping that to mouse button 2?

As far as my config, I would paste it in from my console, but my middle click doesn't work to paste it :(
Back to top
View user's profile Send private message
johoe
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jun 2005
Posts: 92

PostPosted: Tue Oct 03, 2006 1:13 pm    Post subject: Reply with quote

Fast solution for the moment:
Code:
    Driver      "mouse"
    Option "Protocol"    "auto"
    Option "Device"   "/dev/input/mouse0"
    Option "Emulate3Buttons"


with this config you loose your tilt wheel buttons but can "emulate" the middle click by pressing buttons 1 and 2 at the same time...

johoe
Back to top
View user's profile Send private message
jk3us
Apprentice
Apprentice


Joined: 14 Mar 2005
Posts: 201
Location: Memphis, TN

PostPosted: Thu Oct 05, 2006 2:19 am    Post subject: Reply with quote

I was playing around with this some more today.... My plan was to plug the receiver into the windows box, and get the mouse set up just so, then take the mouse far away so it couldn't recieve any more commands, plug it back into this box, and bring the mouse back, hoping that it would remain in that configuration.

However, When I got far enough away, the mouse went back into the default configuration where a click of the wheel toggles the clickiness instead of sending a button 2 event. Seems like that would require kernel/driver modification instead of just a program like logitech-applet to get this working right. That's pretty frustrating.

So, is there a way to may a keypress (the search button) to a mouse button so I can have a middle mouse button? I don't really like the emulate3buttons solution.

If a dev is interested in writing the drivers/software required to get it to work, I'd be willing to chip to help you buy the mouse.
Back to top
View user's profile Send private message
jk3us
Apprentice
Apprentice


Joined: 14 Mar 2005
Posts: 201
Location: Memphis, TN

PostPosted: Thu Oct 05, 2006 6:06 pm    Post subject: Reply with quote

jk3us wrote:
If a dev is interested in writing the drivers/software required to get it to work, I'd be willing to chip to help you buy the mouse.

Allow me to answer my own question (I think): from http://www.jwz.org/xkeycaps/man.html
Quote:
It is also not possible to make a keyboard key behave as a mouse button.


So, no mapping the search "button" (keycode 122) to mouse button 2.
Back to top
View user's profile Send private message
johoe
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jun 2005
Posts: 92

PostPosted: Thu Oct 05, 2006 7:36 pm    Post subject: Reply with quote

But you can emulate a mouse button click with the keyboard. Shift-NumLock enables mouse keys on your numpad. Use 2/4/6/8 as down/left/up/right, respectively. 5 clicks a mouse button, + toggles whether it's the left or right one. * produces a middle-click.
You can even emulate double clicks.

johoe
Back to top
View user's profile Send private message
lucida
Apprentice
Apprentice


Joined: 20 Feb 2003
Posts: 191

PostPosted: Sun Oct 08, 2006 10:50 am    Post subject: Reply with quote

got this mouse in aug, and i finally decide to fix the middle button thing today...so here is the result.

this a quick and dirty hack, anyway, it works fine, at least in my system :P :P

Code:


This program is ripped from joymouse-linux(http://sourceforge.net/projects/joymouse-linux)
All credit goes to the original author


A quick and dirty hack to make MX Revolution "Search button" works
as middle click

1. Compile it by
"gcc memu.c -o memu"

2. As root, set suid(not safe, need fix)
"chmod u+s memu"
"cp memu /usr/local/bin"

3. Install xbindkeys

4. add

    "memu 2"
        m:0x10 + c:122

to ~/.xbindkeysrc

The parameter is which button the program needs to generate, 2 stands for middle button.

5. Configure xorg.conf(from "man joymouse")
       Add these lines to your /etc/X11/xorg.conf :
           Section "InputDevice"
               Identifier   "Joystick"
               Driver      "mouse"
               Option      "Protocol"       "ExplorerPS/2"
               Option      "Device"         "/dev/mxmouse"
               Option      "SendCoreEvents" "true"
               Option      "ZAxisMapping"       "4 5 6 7"
           EndSection

       In  the  "ServerLayout"  section  you  should have 2 InputDevice lines,
       i.e.:

           InputDevice "Mouse"      "CorePointer"
           InputDevice "Joystick"

6. Restart X, and run xbindkeys



Code:

/*
/*
##############################################
Rip from joymouse-linux(http://sourceforge.net/projects/joymouse-linux)
All credit goes to the original author                                   
                                                                         
for more info and usage, check README                                             
lucida_at_gmail_dot_com                                                 
10/08/2006                                                               
##############################################
*/


#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <linux/joystick.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <errno.h>
#include <signal.h>
#include <math.h>

static char *fout="/dev/mxmouse";

int WriteMouseData(int fd,char x,char y,int zx,int zy,unsigned char buttons)
{   /* Write all the data in a certain format to the given file */
#if (1) /* This is ImPS/2 or ExplorerPS/2, not quite sure :-S */
   char data[4];
   data[0]=(0x08)|(buttons&0x07)|((x<0)?0x10:0)|((y<0)?0x20:0);
   data[1]=x;
   data[2]=y;
   data[3]=0x00;
   if (zx)data[3]|=(zx<0)?2:-2;
   if (zy)data[3]|=(zy<0)?1:-1;
#endif
   if (write(fd,data,sizeof(data))!=sizeof(data))return 0;
   return 1;
}


int main(int argc, char *argv[])
{
   int i;
   int fdout;
   int e=mkfifo(fout, 0666);
   fdout=open(fout,O_RDWR|O_SYNC);
   i = atoi(argv[1])-1;
        WriteMouseData(fdout, 0,0,0,0,2<<i);
        WriteMouseData(fdout, 0,0,0,0,0);
   close(fdout);
    return EXIT_SUCCESS;
}

Back to top
View user's profile Send private message
jk3us
Apprentice
Apprentice


Joined: 14 Mar 2005
Posts: 201
Location: Memphis, TN

PostPosted: Sun Oct 08, 2006 3:32 pm    Post subject: Reply with quote

I found the mvmouse program that does the trick (just a little slower than an actual click): http://hocwp.free.fr/movemouse.html . It's the mvmouse version (not movemouse) that can do clicks.... I Don't do french, but it works
Back to top
View user's profile Send private message
lucida
Apprentice
Apprentice


Joined: 20 Feb 2003
Posts: 191

PostPosted: Mon Oct 09, 2006 3:18 am    Post subject: Reply with quote

I searched..but didnt find this program. :(

anyway, my hack works pretty well, and cant feel any delay. It seems that "MicroGear" cant be set under Linux at all, xev reports nothing when press the wheel down.
Back to top
View user's profile Send private message
jk3us
Apprentice
Apprentice


Joined: 14 Mar 2005
Posts: 201
Location: Memphis, TN

PostPosted: Tue Nov 28, 2006 1:02 am    Post subject: Reply with quote

I just came across a little program that does exactly what I need: http://goron.de/~froese/revoco-0.1.tar.gz . It allows you to switch between click and free, and/or let's you assign a button that will toggle (ie, change it from middle click). You do have to have HID and the /dev/usb/hiddevX device file support turned on in your kernel for it to work. and you need to run it as root, I just put '/path/to/revoco manual=6' in /etc/conf.d/local.start, which makes the search button toggle it, and returns real middle click functionality.

And here's a post from a gentoo dev about it, indicating that it will eventually be in portage: http://planet.gentoo.org/developers/betelgeuse/2006/11/26/getting_mx_revolution_setup_in_gentoo .

Anyway... with this little utility makes the mx revolution the best mouse I've ever owned... I don't think I have any other complaints about it... marking solved.
Back to top
View user's profile Send private message
thewhale
n00b
n00b


Joined: 03 Jun 2004
Posts: 4

PostPosted: Sat Dec 02, 2006 2:48 pm    Post subject: Reply with quote

I have discovered a simple workaround for mapping the 'search' button to 'middle click':
    1. Add
    Code:
    keycode 122 = Pointer_Button2
    to your ~/.Xmodmap file and make sure it's considered when X starts.

    2. Press
    Code:
    SHIFT+NUMLOCK
    (or
    Code:
    SHIFT+FN+NUMLOCK
    on a laptop) once X is up.

A bit klugdy, I know, but it works for now.
Back to top
View user's profile Send private message
thewhale
n00b
n00b


Joined: 03 Jun 2004
Posts: 4

PostPosted: Mon Dec 04, 2006 3:54 pm    Post subject: Reply with quote

Upon further investigation, I have come up with a more permanent solution, involving only standard tools, for the remapping problem:
  1. You will need xte, xset and xbindkeys; thus
    Code:
    emerge xautomation xset xbindkeys

  2. Remap the offending keycode (122) to an unused key (e. g. F20) by modifying your ~/.Xmodmap file:
    Code:
    keycode 122 = F20
    Make sure this file is considered when X starts.
  3. Add the following lines to your ~/.xbindkeysrc file:
    Code:
    "xte 'mousedown 2'"
        F20

    "xte 'mouseup 2'"
        F20+Release
    Make sure xbindkeys is started when X starts.
  4. Make sure
    Code:
    xset -r 122
    is executed when X starts.

These steps will map the search key of your Logitech Revolution to mouse button 2.
Back to top
View user's profile Send private message
johoe
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jun 2005
Posts: 92

PostPosted: Sun Dec 10, 2006 12:32 am    Post subject: Reply with quote

Hi arround there - found another great tool for the MX Revolution, which lets you configure the middle wheel:
http://goron.de/~froese/revoco/revoco-0.3.tar.gz
Here the usage help:
Code:
Usage:
  revoco free                      free spinning mode
  revoco click                     click-to-click mode
  revoco manual[=button[,button]]  manual mode change via button
  revoco auto[=speed[,speed]]      automatic mode change (up, down)

Prefixing the mode with 'temp-' (i.e. temp-free) switches the mode
temporarily, otherwise it becomes the default mode after power up.

Button numbers:
  0 previously set button   7 wheel left tilt
  3 middle (wheel button)   8 wheel right tilt
  4 rear thumb button       9 thumb wheel forward
  5 front thumb button     11 thumb wheel backward
  6 find button            13 thumb wheel pressed

For this we'va all been waiting for. Hope you find this useful...

johoe
Back to top
View user's profile Send private message
funeagle
Tux's lil' helper
Tux's lil' helper


Joined: 05 Aug 2003
Posts: 95
Location: London

PostPosted: Sun Oct 14, 2007 6:30 pm    Post subject: Reply with quote

thewhale thanks for the tip, this is exactly what I needed. I wanted the search button to work as the middle click and use the numeric keypad as well :)
You are my hero today!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum