Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
X/Mouse Extra Buttons HOWTO
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
greenbob
n00b
n00b


Joined: 24 Jun 2003
Posts: 48
Location: Charlotte, NC

PostPosted: Mon Nov 10, 2003 10:55 pm    Post subject: Reply with quote

I would suggest placing those lines in the file /etc/X11/xinit/xinitrc
You could make your own file .xinitrc and place it in your home directory but for a newb I would not recommend this. And you do not need an execute command, just put that line in the file, do this towards middle of file, usually right after it loads xmodmap. And be sure to place the xmodmap line before the imwheel line.
Back to top
View user's profile Send private message
DeepThoughts
n00b
n00b


Joined: 02 Nov 2003
Posts: 43
Location: The Northern Part of Sweden (Piteå)

PostPosted: Tue Nov 11, 2003 2:44 am    Post subject: Reply with quote

I still can't get it to work... :cry: Could someone take a look at my /etc/X11/xinit/xinitrc and tell where to put it and how to put it?

Code:
#!/bin/sh
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
xinitdir=/usr/X11R6/lib/X11/xinit
sysresources=$xinitdir/.Xresources
sysmodmap=$xinitdir/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f $userresources ]; then
    xrdb -merge $userresources
fi

if [ -f $usermodmap ]; then
    xmodmap $usermodmap
fi

# First try ~/.xinitrc
if [ -f "$HOME/.xinitrc" ]; then
   XINITRC="$HOME/.xinitrc"
   exec /bin/sh "$HOME/.xinitrc"
# If not present, try the system default
elif [ -n "`/etc/X11/chooser.sh`" ]; then
   exec "`/etc/X11/chooser.sh`"
# Failsafe
else
   # start some nice programs
   twm &
   xclock -geometry 50x50-1+1 &
   xterm -geometry 80x50+494+51 &
   xterm -geometry 80x20+494-0 &
   exec xterm -geometry 80x66+0+0 -name login
fi
Back to top
View user's profile Send private message
greenbob
n00b
n00b


Joined: 24 Jun 2003
Posts: 48
Location: Charlotte, NC

PostPosted: Tue Nov 11, 2003 3:31 am    Post subject: Reply with quote

It's working b/c its not in there at all. Try this instead using the 9 button method posted by ecatmur, which works even if you don't have 9 buttons, and is the one I'm currently using. Then you must make a file called .imwheelrc and place this in your home directory, just copy the one listed in the 9 button method, you may want to add some lines for mozilla, if that is what you use.

Code:
#!/bin/sh
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
xinitdir=/usr/X11R6/lib/X11/xinit
sysresources=$xinitdir/.Xresources
sysmodmap=$xinitdir/.Xmodmap

xmodmap -e "pointer = 1 2 3 8 9 6 7"
imwheel -b -p 000089 -f

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f $userresources ]; then
    xrdb -merge $userresources
fi

if [ -f $usermodmap ]; then
    xmodmap $usermodmap
fi

# First try ~/.xinitrc
if [ -f "$HOME/.xinitrc" ]; then
   XINITRC="$HOME/.xinitrc"
   exec /bin/sh "$HOME/.xinitrc"
# If not present, try the system default
elif [ -n "`/etc/X11/chooser.sh`" ]; then
   exec "`/etc/X11/chooser.sh`"
# Failsafe
else
   # start some nice programs
   twm &
   xclock -geometry 50x50-1+1 &
   xterm -geometry 80x50+494+51 &
   xterm -geometry 80x20+494-0 &
   exec xterm -geometry 80x66+0+0 -name login
fi
Back to top
View user's profile Send private message
Hairshorts
n00b
n00b


Joined: 24 Aug 2003
Posts: 18

PostPosted: Tue Nov 25, 2003 11:25 pm    Post subject: Reply with quote

I'm having trouble getting my side button to work with imwheel. I have an intellimouse mouseman optical USB mouse which has a scroll wheel and one side button. If I run xev before running imwheel I can generate ButtonPress events with the side button, and it shows up as button 6, so I think my XF86Config is set up correctly. I then run
Code:
imwheel -k -b "6"
with the following .imwheelrc:
Code:
".*"
None, Up, F1

Now when I run xev the side button generates KeyPress events with keycode 99, which happens to be the same keycode as the Page Up key. The strange thing is, when I hit the side button in some applications, such as emacs, it recognizes the keystroke as F1, but when I hit the side button in gkrellm it recognizes it as Page Up and changes my theme, instead of popping up the configuration window as it should. I've tried more bindings than just F1, and they all exhibit the same behavior. How on earth can I give button 6 a different keycode?
Back to top
View user's profile Send private message
stormer
Tux's lil' helper
Tux's lil' helper


Joined: 20 May 2002
Posts: 122
Location: Canada

PostPosted: Wed Nov 26, 2003 6:12 pm    Post subject: SIS chipset Reply with quote

Attention!

ehci-hcd is no enough driver support to get the wheel working whit sis usb controller.
You have to compile ohci-hcd too, with both every thing works find with IMPS/2 drivers.

It is true for both 2.4 and 2.6 kernel.
Have fun!

p.s. It is probably the same whit Via chips using uhci-hcd.
_________________
Stormer :)
Back to top
View user's profile Send private message
OliD
n00b
n00b


Joined: 12 Jun 2003
Posts: 9
Location: Germany

PostPosted: Mon Dec 01, 2003 1:08 pm    Post subject: Re: SIS chipset Reply with quote

stormer wrote:
Attention!

ehci-hcd is no enough driver support to get the wheel working whit sis usb controller.
You have to compile ohci-hcd too, with both every thing works find with IMPS/2 drivers.

It is true for both 2.4 and 2.6 kernel.
Have fun!

p.s. It is probably the same whit Via chips using uhci-hcd.


This is definately so, because ehci is only for USB 2.0, ohci and uhci only for 1.*.

Ciao

Oli D.
Back to top
View user's profile Send private message
jerome187
Guru
Guru


Joined: 29 Apr 2003
Posts: 584

PostPosted: Wed Dec 17, 2003 10:07 pm    Post subject: Reply with quote

nico-- wrote:
ecatmur wrote:
Maybe someone will correct me, but I can't see any way to use more than 9 buttons in total with imwheel and xmodmap. Might be time for someone to make a patch - I probably would if I had such a mouse.
By the way, how do they fit more than 9 logical buttons onto a mouse anyway? What does the Windows software do with the actions? Can you link to a product page?


Here is one mouse with more than 9... two buttons + the wheel (3) + the two thumb buttons + the three buttons near the wheel.


I have this mouse, I got the 2 side buttons working (sortof, they produce events in xev) and the 2 buttons closest to the wheel (they just act like the wheel, nothing special about them for now) but I cant get the one little button below the wheel and wheel buttons to work. any suggestions? I threw in a button 8 in everything, but it dosent seem to work.

My xmodmap -pp
Code:
There are 8 pointer buttons defined.

    Physical        Button
     Button          Code
        1              1
        2              2
        3              3
        4              6
        5              7
        6              4
        7              5
        8              8
Back to top
View user's profile Send private message
ecatmur
Advocate
Advocate


Joined: 20 Oct 2003
Posts: 3595
Location: Edinburgh

PostPosted: Thu Dec 18, 2003 12:46 am    Post subject: Reply with quote

Ah... well, this could be interesting.
I guess the first thing to do is to check whether the little button produces any X events at all, by clicking it over an xev window. You should do this with the ZAxisMapping turned off to see which button event it generates (I'm guessing 6, after the standard 5 for left-middle-right-back-forward).

If it does signal on button 6, you'll then need a ZAxisMapping of "7 8 9 10" (and Buttons "10") to prevent it overwriting that button, however that's where it gets interesting. As imwheel only currently supports 9 butons you'll need to either modify the source yourself or persuade the developer to modify it (hint: the quickest - if not the cheapest - way to get him to do this would be to buy him one of those mice to 'test with').
Once that's done it's plain sailing - use an xmodmap of "pointer = 1 2 3 8 9 10 4 5 6 7" and whatever the new button is now called in imwheelrc.

If X doesn't detect the little button, you'd have to look into modifying the mouse driver itself. 8O - personally I view the X source tree as about twice as arcane and scary as the kernel tree...
Back to top
View user's profile Send private message
jerome187
Guru
Guru


Joined: 29 Apr 2003
Posts: 584

PostPosted: Thu Dec 18, 2003 6:02 am    Post subject: Reply with quote

The two little buttons on either sides of the scroll wheel are just buttons 4 and 5, just like the scrool wheel is (I confirmed this in xev, and they act just like the scroll wheel also) So I dont think I need to worry about those 2 little buttons at all, I think there just extra 4 and 5 butons, thats all (or at least thats what there acting like).

The other little button dosent generate anything in xev tho :( Would really like to get it working so I can map it to Alt-Tab for easy window switching.
Back to top
View user's profile Send private message
richjoyce
n00b
n00b


Joined: 22 Oct 2002
Posts: 20
Location: Canada

PostPosted: Thu Jan 01, 2004 6:32 am    Post subject: Reply with quote

I have this mouse too (cordless mx 700) and although I haven't got them working yet (because I haven't had time, haven't tried) I can tell you this mouse has 8 different buttons. The two buttons (1,2), the middle mouse button (3), the scroll up (4), scroll down (5) buttons above and below the wheel, and the wheel is also 4 & 5, and then the two side buttons (6,7) and then the windows changing button (function in windows) (8\)

I think the problem is, that jerome does not have the scroll wheel mapped as the last two buttons. You have them as 6,7 and they should be 7,8, and then the physical 8 button should be 6
Back to top
View user's profile Send private message
woodwizzle
Apprentice
Apprentice


Joined: 30 Nov 2003
Posts: 225

PostPosted: Mon Jan 26, 2004 9:30 am    Post subject: Reply with quote

I can't get my 2 other buttons to generate events. I added everything to my XF86COnfig and .xsession files. I looked at my log output and xmodmap gets an error saying bad number of buttons (5 instead of 7).
Back to top
View user's profile Send private message
lucida
Apprentice
Apprentice


Joined: 20 Feb 2003
Posts: 191

PostPosted: Fri Jan 30, 2004 1:37 pm    Post subject: Reply with quote

I'm using an Intellimouse Explorer 3 w/2 side buttons, and I have troubles with them.

I set the XF86Config and xmodmap as described, and, I got two events when I press down one of the side buttons(button 6 and button2), and another 2 events when I released the button. Press another side button give me 7 and 3.

Does anyone encounters the same problem?
Back to top
View user's profile Send private message
xHemi
n00b
n00b


Joined: 19 Dec 2002
Posts: 36
Location: /dev/urandom

PostPosted: Wed Feb 11, 2004 4:47 pm    Post subject: Reply with quote

You guys should try to add a -p to your imwheel call. Like so:
Code:
imwheel -k -b "67" -p &

Otherwise imwheel might die on you when it tries to write the PID file.

Hoped that helped someone :P
Back to top
View user's profile Send private message
Markus_T
n00b
n00b


Joined: 09 Feb 2004
Posts: 49
Location: Berlin

PostPosted: Wed Feb 11, 2004 6:46 pm    Post subject: Reply with quote

Hairshorts wrote:
I'm having trouble getting my side button to work with imwheel. I have an intellimouse mouseman optical USB mouse which has a scroll wheel and one side button. If I run xev before running imwheel I can generate ButtonPress events with the side button, and it shows up as button 6, so I think my XF86Config is set up correctly. I then run
Code:
imwheel -k -b "6"
with the following .imwheelrc:
Code:
".*"
None, Up, F1

Now when I run xev the side button generates KeyPress events with keycode 99, which happens to be the same keycode as the Page Up key. The strange thing is, when I hit the side button in some applications, such as emacs, it recognizes the keystroke as F1, but when I hit the side button in gkrellm it recognizes it as Page Up and changes my theme, instead of popping up the configuration window as it should. I've tried more bindings than just F1, and they all exhibit the same behavior. How on earth can I give button 6 a different keycode?


The most important thing to remember is to use the -f option when starting
imwheel. This "forces the X event subwindow to be used" and should fix
your problems. Otherwise some aplications (e.g. Firefox) don't behave as
they should.
Also try changing your .imwheelrc to:
Code:
".*"
None, Thumb1, F1
Back to top
View user's profile Send private message
InfinityX
Guru
Guru


Joined: 31 Jan 2004
Posts: 385

PostPosted: Thu Feb 12, 2004 2:40 am    Post subject: Reply with quote

I've almost managed to get my MX500 working. It works fine if I type the xmod line into a terminal and start imwheel, but I just can't get it work when kde starts.

I placed the lines in the xinitrc (which I confess I haven't the slightest clue what's for). Care to help a dumbfounded newbie? :(
Back to top
View user's profile Send private message
tsigo
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jul 2002
Posts: 122

PostPosted: Thu Feb 12, 2004 11:57 pm    Post subject: Reply with quote

I've tried putting the xmodmap command in both ~/.xinitrc and ~/.xsession, neither makes a difference. I've put it in my main user's folder and also /root. Do I have to do something different if I use xdm (kdm) instead of startx?
Back to top
View user's profile Send private message
theonlymcc
Apprentice
Apprentice


Joined: 16 Sep 2003
Posts: 274
Location: NC

PostPosted: Mon Feb 16, 2004 6:03 am    Post subject: Reply with quote

For anyone using a laptop with a touchpad and wanting to use a USB Intellimouse with the side buttons, this is for you. I triple checked all the files and options related to geting the side buttons working. No matter what I did, the side buttons would scroll and the wheel would do nothing. I fixed this by reversing two things in the XF86Config.
1.) Changed my touchpad from CorePointer to SendCoreEvents
2.) Change my usb mouse from SendCoreEvents to CorePointer.
Presto it worked. I am using a Dell i5150 if anyone is wondering.

P.S. - We (NC State, looking at my profile to the left, I live in Raleigh and go State) raped Duke tonight! YAY!!!!
Back to top
View user's profile Send private message
mholtz
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2004
Posts: 110
Location: Ohio, USA

PostPosted: Mon Feb 16, 2004 11:47 pm    Post subject: Reply with quote

Yeah I noticed the same thing. Apparently in X, if you want to use two pointers simultaneously, one has to be the CorePointer and the other can merely SendCoreEvents. xmodmap can only modify the core pointer.

In my case, I have a plain jane two button PS/2 mouse and a 7 button USB optical intellimouse. I also had to move the Intellimouse to be the CorePointer in order to remap the buttons.

Is there no other way to remap buttons on non-CorePointer pointers? What if I wanted one mouse to be right handed and the other left handed, for example?
Back to top
View user's profile Send private message
metalh34d
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2004
Posts: 126

PostPosted: Thu Feb 19, 2004 6:37 am    Post subject: Reply with quote

Ok so I've tried to get my thumb buttons working. I first attempted the 9 button trick but that made it so my scroller didnt even work. I use a Logitec MX700 btw. Ok so basically what happens so far is any program I do if I use the button thumb button it does a middle click. If I do the top button it does a right click. Here's my xinit settings:

xmodmap -e "pointer = 1 2 3 6 7 4 5"
imwheel -k -b -p "67" -f
kahakai

my .imwheelrc looks like this atm:

"Firefox.*"
None, Up, Alt_L|Left
None, Down, Alt_L|Right

".*"
None, Up, Alt_L|Left
None, Down, Alt_L|Right

XF86Config:

Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
Option "Buttons" "7"
Option "ZAxisMapping" "6 7"


Any input on the matter?
Back to top
View user's profile Send private message
TenPin
Guru
Guru


Joined: 26 Aug 2002
Posts: 500
Location: Kansas City

PostPosted: Sat Feb 21, 2004 4:45 pm    Post subject: Reply with quote

I have a Logitech MX300 and I like to use the little button on top as my middle button and I never use the wheel as a button:

Code:

Section "InputDevice"
    Identifier  "Mouse0"
    Driver      "mouse"
    Option      "Protocol" "ExplorerPS/2"
    Option      "Device" "/dev/input/mouse0"
    Option      "Buttons" "6"
    Option      "ZAxisMapping" "5 6"
EndSection


Then:

Code:
xmodmap -e "pointer = 1 6 3 2 4 5"


If I use just IMPS/2 then the wheel button and the extra button both act as the middle button but I think using IMPS/2 has been the cause of my mouse going crazy every hour or so and giving a bytes lost error in dmesg.
Back to top
View user's profile Send private message
allancairns
Tux's lil' helper
Tux's lil' helper


Joined: 18 Dec 2003
Posts: 80
Location: Perth, Western Australia

PostPosted: Fri Feb 27, 2004 2:17 am    Post subject: Reply with quote

Hey guys,

Some great advice here. How about helping someone with an older device?

I'm running a Logitech Trackman Marble so old the model # has worn off the bottom (I got it in about 1998 I think). It is a trackball arrangement and has three buttons and NO SCROLLWHEEL.

When I use this mouse in Windows clicking the middle button results in a small icon popping up on my screen where the mouse pointer was that looks like four arrows pointing NSEW. Moving my pointer from this icon results in the active window scrolling in the direction I moved the pointer. This is great as it handles up-down AND left-right scrolling as well as scrolling at different speeds (depending on how far you move from the icon). You then click again on the middle button to get out of scroll mode.

Is there anything like this in Linux? I love this mouse (no problems with limited deskspace, great for gaming) but I find it a pain not having scroll in windows without a scrollbar (eg. transparent eterm) and even moving my mouse over to the scrollbar where it exists is annoying after my experience in Windows.

TIA,
_________________
Allan
_____________________________________
There is no 'I' in team, but there is a 'me' if you look hard enough ;-)
Back to top
View user's profile Send private message
helmers
Guru
Guru


Joined: 16 Sep 2002
Posts: 553
Location: Stange, Norway

PostPosted: Sat Feb 28, 2004 8:30 am    Post subject: Reply with quote

I'd also like some help.

I've gotten a new, very nice mice, from Microsoft. :lol:
It's an Intellimouse Explorer 4, see it here:
http://www.microsoft.com/hardware/mouseandkeyboard/productdetails.aspx?pid=003#

The problem is that I would like to use all it's fancy features:
- The tilt wheel, to scroll horizontally
- The back and forward buttons

I've never had much luck with imwheel, could someone give me some easy steps to follow? The scrollwheel is on buttons "4 5" like regular mice.

Thanks! :wink:
_________________
C is for Cookies!
Back to top
View user's profile Send private message
psofa
Guru
Guru


Joined: 28 Feb 2004
Posts: 485

PostPosted: Fri Mar 05, 2004 12:42 pm    Post subject: Reply with quote

will someone make this sticky? it worked for me! :)
_________________
psofa
Back to top
View user's profile Send private message
helmers
Guru
Guru


Joined: 16 Sep 2002
Posts: 553
Location: Stange, Norway

PostPosted: Fri Mar 05, 2004 12:56 pm    Post subject: Reply with quote

It is in the tips and tricks section, I think there are many good threads here, and making one sticky and not all the others wouldn't be all nice.

What would be nice where if someone (with a lot of time and dedication) could go through these tips, and create a large document, divided into categories of tips.

I often find myself strolling these pages, but it is sometimes hard to find what one is looking for, even with the search function.
_________________
C is for Cookies!
Back to top
View user's profile Send private message
calhoun
Tux's lil' helper
Tux's lil' helper


Joined: 14 Nov 2003
Posts: 91
Location: Point Pleasant, NJ

PostPosted: Sat Mar 06, 2004 7:42 pm    Post subject: Reply with quote

bump
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 2 of 7

 
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