LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 12-04-2004, 01:26 AM   #1
tardigrade
Member
 
Registered: Jun 2004
Distribution: SuSE 9.1
Posts: 150

Rep: Reputation: 15
mouse buttons 6 and 7


I just got a Kensington 5 button mouse (i guess 7). that is right left middle scroll up/down and side right/left. i want to use the side buttons in ways that minimize my total daily clicks. my suse 9.1 auto makes the side left a middle click and the right a right click. i have seen lots of posts on this but every one uses them as.. ZAxisMapping . Can any one think of a way i can get mouse mouse configured as (noteing i have KDE set to dbl click to open):
right: highlight/normal right button actions
left: normal left button action
middle:normal
scroll whell: scroll up/down
side right: dbl click right <------------------
side left: i dunno yet.

is it possible the set that up? could i map it in /etc/XF86Config as something wierd then set a kde mouse gesture or something? does any know where i can find all the options for CF86Config? any ideas? thanks.
 
Old 12-04-2004, 01:58 AM   #2
Boow
Member
 
Registered: Feb 2004
Distribution: Slackware 10.2
Posts: 669

Rep: Reputation: 32
search google or these forums been asked many times
 
Old 12-04-2004, 02:09 AM   #3
nagromo
Member
 
Registered: Mar 2004
Location: Minnesota, USA
Distribution: Debian, Mepis
Posts: 65

Rep: Reputation: 15
I'm a noob and I recently had the same problem with my 9-button mouse, so I have no problems helping you. First you have to get the X to recognize your extra buttons. Here's my mouse section of the files:

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "Buttons" "9"
Option "ZAxisMapping" "6 7 8 9"
EndSection

You'd have to change that some to get it to work with your hardware, but that's not that tough. Note that a scroll wheel counts as two buttons.

Then, to get the buttons to actually do something, I used xbindkeys. Get xbindkeys-config as well; it makes it a ton easier. I don't know where you'd get packages; I got them off of apt. Use xbindkeys-config to have a X event execute a command. With the config program you can just create a new binding, give it a name, use the 'get key' button and instead click the button on your mouse, and give it a command to execute. I used these commands for forward and back:

"xvkbd -xsendevent -text "\[Alt_L]\[Left]""
"xvkbd -xsendevent -text "\[Alt_L]\[Right]""

You can send any keypress that way. (I'm still trying to figure out how to send a mouse event to a specific window by name; I could just write a C program, though.)

I hope that helps you.
 
Old 12-04-2004, 12:43 PM   #4
TaNeK
Member
 
Registered: Dec 2004
Posts: 59

Rep: Reputation: 15
can you please tell me what the names of the mousebuttons nr 6 and 7 are? i can't use the get key function on mousebuttons for some reason...
 
Old 12-04-2004, 12:56 PM   #5
nagromo
Member
 
Registered: Mar 2004
Location: Minnesota, USA
Distribution: Debian, Mepis
Posts: 65

Rep: Reputation: 15
They don't have actual names; in my config file it's like a bunch of random ascii characters. If the get key function doesn't work you don't have the mouse set up properly.

How is the mouse connected to the computer? (USB, PS/2?) Show us the mouse section of your XF86Config-4 file.
 
Old 12-04-2004, 01:45 PM   #6
tardigrade
Member
 
Registered: Jun 2004
Distribution: SuSE 9.1
Posts: 150

Original Poster
Rep: Reputation: 15
im having trouble here. heres my XF86Config:
Section "InputDevice"
Driver "mouse"
Identifier "Mouse[1]"
Option "Buttons" "7"
Option "Device" "/dev/input/mice"
Option "InputFashion" "Mouse"
Option "Name" "USB-Mouse;ExplorerPS/2"
Option "Protocol" "ExplorerPS/2"
Option "ZAxisMapping" "4 5"
EndSection

as it is all the main buttons work 'normaly' and the side buttons dont work. i ran xev and buttons 4 and 5 are the scroll wheel but its working like a normal scroll wheel not zaxis and xev doesnt see the side buttons. if i change the Zaxis mapping to 6 7 then xev sees the scroll wheel as 6 and 7. it doesnt make any sense.

Last edited by tardigrade; 12-04-2004 at 01:49 PM.
 
Old 12-04-2004, 03:15 PM   #7
tardigrade
Member
 
Registered: Jun 2004
Distribution: SuSE 9.1
Posts: 150

Original Poster
Rep: Reputation: 15
ok so it works now. using:
/etc/X11/XF86Config :

Section "InputDevice"
Driver "mouse"
Identifier "Mouse[1]"
Option "Buttons" "7"
Option "Device" "/dev/input/mice"
Option "InputFashion" "Mouse"
Option "Name" "USB-Mouse;ExplorerPS/2"
Option "Protocol" "ExplorerPS/2"
Option "ZAxisMapping" "6 7"
EndSection

and then running the command
xmodmap -e "pointer = 1 2 3 6 7 4 5"
then run
xmodmap -pp
just to show what its doing.
if you add xmodmap -e "pointer = 1 2 3 6 7 4 5" to your ~/.xinitrc file you wont have to manualy run it every time you restart x.

Now that i got all thebuttons working how can i change the actions of the side buttons. I want to have the right side to emulate a double click on a single click.

nagromo:
I cant find the config program for that xbindkeys program. what does your ~/.xbindkeysrc file look like? i found the main program in apt for suse.
 
Old 12-04-2004, 05:00 PM   #8
TaNeK
Member
 
Registered: Dec 2004
Posts: 59

Rep: Reputation: 15
My XF86Config looks like:

Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "ExplorerPS/2"
Option "Device" "/dev/input/mice"
Option "Buttons" "7"
Option "ZAxisMapping" "4 5"

And the scrolling works perfectly. I cant see why it cannot find the last 2 buttons using get key. Havn't written anythin extra in xsession.options. Using Debian btw.

Have now added
xmodmap -e "pointer = 1 2 3 6 7 4 5"
xmodmap -pp
to my xinitrc file. still though it seems to not work, as my scroll is still buttons 4 and 5. And I cannot bind them in xbindkeys-config using get key.

Using usb

Last edited by TaNeK; 12-05-2004 at 07:07 AM.
 
Old 12-05-2004, 11:25 PM   #9
nagromo
Member
 
Registered: Mar 2004
Location: Minnesota, USA
Distribution: Debian, Mepis
Posts: 65

Rep: Reputation: 15
tardigrade:

My mouse is set to use buttons 8 and 9 in my .xbindkeysrc, so they would definitely be different. Look in apt and look at the info for xbindkeys; I learned about the config program because it was a recommended package. It might be a different package name.

To all:

If you're trying to get mouse buttons to work, launch xev from a command line. It will display all of the events that go to its window. Move your mouse into the window, and hold it still then click on the special mouse button. If a new event pops up you have it configured to work with X and can use xbindkeys. If not you need to go back to XF86Config-4.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MX1000 mouse buttons pukington Linux - Newbie 1 03-20-2005 08:45 PM
how do i switch mouse buttons ZaphyR Linux - General 7 01-09-2005 10:52 PM
USB Mouse Buttons IlliniGrad Linux - Hardware 0 04-03-2003 10:59 AM
Customizing mouse buttons ebakunin Linux - General 1 05-29-2002 02:21 AM
..But my mouse does have 5 buttons!!! Grimnir Linux - General 12 02-18-2002 08:15 AM


All times are GMT -5. The time now is 10:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration