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
Joffer
Guru
Guru


Joined: 10 Sep 2002
Posts: 585
Location: Arendal, Norway

PostPosted: Mon Jul 19, 2004 11:26 am    Post subject: Reply with quote

genoob wrote:
To get the side buttons working in xfce4, you need to make a little script (and set it as executable) in your ~/Desktop/Autostart/ directory:

Code:

#!/bin/sh
xmodmap -e "pointer = 1 2 3 6 7 4 5" &
imwheel -k -b "67" -p


The rest of the settings for the imwheelrc and XFConfig files are the same as explained already.
Why? Doesn't xfce4 support ~/.xinitrc? (Apparantly not, since I've got those line in my .xinitrc and it isn't invoced when I startxfce4.

Just a quick sidequstion - what should I put in XSESSION in rc.conf to start xfce4 as default?
Back to top
View user's profile Send private message
Joffer
Guru
Guru


Joined: 10 Sep 2002
Posts: 585
Location: Arendal, Norway

PostPosted: Tue Jul 20, 2004 9:19 am    Post subject: Reply with quote

genoob wrote:
To get the side buttons working in xfce4, you need to make a little script (and set it as executable) in your ~/Desktop/Autostart/ directory:

Code:

#!/bin/sh
xmodmap -e "pointer = 1 2 3 6 7 4 5" &
imwheel -k -b "67" -p


The rest of the settings for the imwheelrc and XFConfig files are the same as explained already.

Or you could add this to your .xinitrc file (I've added it to bottom of the file)
Code:
source /etc/xfce4/xinitrc
Back to top
View user's profile Send private message
thechris
Veteran
Veteran


Joined: 12 Oct 2003
Posts: 1203

PostPosted: Mon Jul 26, 2004 8:24 am    Post subject: Reply with quote

these intructions fail for me. here is the relevent output:
Code:
bash-2.05b$ xmodmap -e "pointer = 1 2 3 6 7 4 5"
xmodmap:  commandline:0:  bad number of buttons, must have 5 instead of 7
xmodmap:  1 error encountered, aborting.
bash-2.05b$ imwheel -k -b "67" -p
WARNING: imwheel process could not be verified, it may not be running anymore, that's OK!
: No such file or directory
WARNING: imwheel process could not be verified, it may not be running anymore, that's OK!
: No such file or directory
WARNING: imwheel pid file could not be removed.
  Perhaps you want the -p option.
  Or SUID root the imwheel executable...
: Operation not permitted
WARNING: imwheel is not checking/writing a pid file, BE CAREFUL!
  An imwheel may be running already.
  Two or more imwheel processes on the same X display,
  or simultaneously using a wheel fifo,
  will not operate as expected!
INFO: imwheel started (pid=22910)
bash-2.05b$ ps -A | grep imwheel
22910 ?        00:00:00 imwheel
Back to top
View user's profile Send private message
thechris
Veteran
Veteran


Joined: 12 Oct 2003
Posts: 1203

PostPosted: Mon Jul 26, 2004 8:32 am    Post subject: Reply with quote

added option buttons 7 and zaxismapping from 4 5 to 6 7.
result -- mousewheel now moves back and forward...
so i switch zaxis back to 4 5. mouse wheel works, side buttons don't...
Back to top
View user's profile Send private message
RealNitro
Tux's lil' helper
Tux's lil' helper


Joined: 01 Jul 2004
Posts: 98

PostPosted: Mon Jul 26, 2004 8:39 am    Post subject: Reply with quote

thechris wrote:
added option buttons 7 and zaxismapping from 4 5 to 6 7.
result -- mousewheel now moves back and forward...
so i switch zaxis back to 4 5. mouse wheel works, side buttons don't...

You _have_ to use the xmodmap command in some way. If there is no such command, check my previous post here to do it in a different way (with an Xmodmap file).
Back to top
View user's profile Send private message
thechris
Veteran
Veteran


Joined: 12 Oct 2003
Posts: 1203

PostPosted: Wed Jul 28, 2004 12:34 am    Post subject: Reply with quote

how do i use xmodmap. as i said in the last post, i changed the number of buttons in xfree.

restart xfree

xmodmap works. now the side mouse buttons still don't work and the mousewheel moves forward or back in pages...

what new xmodmap command must i try.
Back to top
View user's profile Send private message
firephoto
Veteran
Veteran


Joined: 29 Oct 2003
Posts: 1599
Location: +48° 5' 23.40", -119° 48' 30.00"

PostPosted: Wed Jul 28, 2004 12:55 am    Post subject: Reply with quote

xmodmap -p
That will show you how the buttons are mapped currently. Just run that from a user console then adjust the mapping order till the buttons are mapped to their proper function.
So use something like
xmodmap -e "pointer = 1 2 3 6 7 4 5"
or 1:1
xmodmap -e "pointer = 1 2 3 4 5 6 7 "

You'll eventually find something that works.

The changes are instant when you are inside of X so you don't need to log off and back on each time you change it, only to test your startup config to make sure it works.

Also you should kill imwheel till you get your the basic buttons showing some output then setup imwheel if that's what you want to use.

What kind of mouse are you using?
Back to top
View user's profile Send private message
thechris
Veteran
Veteran


Joined: 12 Oct 2003
Posts: 1203

PostPosted: Wed Jul 28, 2004 7:06 pm    Post subject: Reply with quote

i noticed the xmodmap would fix the error with the mousewheel up/down

one combo -- 1 2 3 6 7 4 5 took away my mousewheel and gave it fwd/back capabilites in browser

the other -- 1 2 3 4 5 6 7 gave me mousewheel, but did not give me fwd/back mouse buttons.

edit -- gentoo has broke and i can not log into X. permission is suddenly denied. i may take a while to get back to this thread.
Back to top
View user's profile Send private message
Barks
n00b
n00b


Joined: 20 Sep 2003
Posts: 30
Location: Barrie ON, Canada

PostPosted: Mon Aug 02, 2004 2:51 am    Post subject: Reply with quote

Whenever I try to issue an imwheel command of some sort I recieve an error which always ends:

Code:

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Could not open display, check shell DISPLAY variable, and export or setenv it!



I can only assume and continue to research, but has anyone encountered this error or knows what it's referring to?
_________________
Some aim to please, I aim to tease.
Back to top
View user's profile Send private message
Virtuous
n00b
n00b


Joined: 05 Aug 2004
Posts: 1

PostPosted: Thu Aug 05, 2004 11:13 pm    Post subject: Very Useful thread Reply with quote

Here es my situation :
I already do the 7 button config in XFRE....
Same for xmodmap and imwheel
Now the real problem is that when asign imwheel -k -b "67" all four buttons (MouseWheelUP-MouseWheelDown-SideButton1-SideButton1) are afected in the same way, now when I scroll down It do the Scroll + Fordward, and when a press de side button for forward it make and scrool + fordward.
If I kill imwheel all four buttons only scroll.
I'm running SuSE 9.1 and a Logitech MX310 mouse.
I Really need some kind of help to solve this problem.
Thanxs.
Back to top
View user's profile Send private message
avunculus
n00b
n00b


Joined: 09 Aug 2004
Posts: 7

PostPosted: Mon Aug 09, 2004 2:03 am    Post subject: imwheel unnecessary Reply with quote

Just wanted to add that at least with the version of firefox that I'm running (0.9.3), and with my Logitech MX700 mouse, imwheel is completely unnecessary. If you use xmodmap the way it's indicated, your thumb buttons should be happily mapped to browser forward/back.
Back to top
View user's profile Send private message
R!tman
Veteran
Veteran


Joined: 18 Dec 2003
Posts: 1303
Location: Zurich, Switzerland

PostPosted: Thu Aug 12, 2004 5:01 pm    Post subject: Reply with quote

Thanks for the HowTo, I will need this with my new mouse.
Back to top
View user's profile Send private message
eeknay
Guru
Guru


Joined: 07 Jul 2003
Posts: 402
Location: EndOfTheRainbow

PostPosted: Tue Aug 31, 2004 10:13 pm    Post subject: Reply with quote

uhm, works fine except that the two side buttons don't work like they're supposed to.
BUT, pressing down the wheel and moving it for-/backward it does act like the 2 side buttons should like. :roll: :?: :?:

eeknay
_________________
Linda: "The holiday season is time of celebration for most but it is also the time to remember the tragic suffering of the less fortunate."
Morbo: "Earthlings do not yet know the meaning of suffering."
Back to top
View user's profile Send private message
WarnK
n00b
n00b


Joined: 13 Sep 2004
Posts: 34

PostPosted: Tue Sep 28, 2004 4:44 pm    Post subject: Reply with quote

I have an logitech mx510, and use fluxbox.

edit: im just stupid.

But! What I really want to do is swtich workspaces with my now working side buttons in fluxbox, can't see how to set up .imwheelrc right to do that.
Back to top
View user's profile Send private message
FFred
n00b
n00b


Joined: 04 Aug 2004
Posts: 23
Location: Paris, France

PostPosted: Mon Oct 18, 2004 12:36 pm    Post subject: Reply with quote

I'm reposting here what I posted in kernel / hardware in the hope that this thread is more appropriate. My mouse has 12 buttons so things get a bit more complicated :)



Ok...

I insrtalled my MX 1000 (picked because it was the only one with more than 3 buttons and I needed to replace my mouse right away) which works fine as a 3 button mouse. Attempts to make all buttons work however have all failed.

With evdev enabled both in the kernel (2.6.7-gentoo-r11 on amd64) and in X (X.org 6.7.0-r2) I get the following when testing with xev :

After running xmodmap -e "pointer = default" to reset everything...

button 1 (left mouse) : 1
button 2 (wheel) : 2
button 3 (right button) : 3
wheel up : 9
wheel down : 10
wheel left : no event
wheel right : no event
button above wheel : 9
button below wheel : 10
forward thumb button : 5
back thumb button : 4
middle thumb button : no event

So I only get the following buttons :
1 2 3 4 5 9 10
which is 7 out of 12 if I count the redundant codes.

The relevant section of my xorg.conf is :

Section "InputDevice"
# Identifier and driver
# Settings for Logitech MX1000 12 button mouse
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "evdev"
Option "DevName" "ImExPS/2 Logitech Explorer Mouse"
Option "DevPhys" "isa0060/serio1/input0"
Option "Device" "/dev/input/event0"
Option "Buttons" "12"
Option "ZAxisMapping" "9 10 11 12"
Option "Resolution" "800"
EndSection

So is there a way to get a distinct event per button ?
And is there a logic behind the order of the button numbers as set with x:modmap ? I haven't quite figured how to create the sequence...
Back to top
View user's profile Send private message
BootNinja
n00b
n00b


Joined: 19 Mar 2004
Posts: 53
Location: Lubbock, TX

PostPosted: Tue Oct 19, 2004 10:02 am    Post subject: Reply with quote

I've gotten my wheel and thumb button working now, but I want to map my mousewheel button to browser forward. I tried modifying my imwheel argument to say -b "62" but it doesn't work.

also, whenever I run Imwheel manually I get the following error message;
Quote:

Expected 3 args, got 2, in config.
Downalt_LRight


my .imwheelrc file looks like this:

Quote:

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


any help would be great!
Back to top
View user's profile Send private message
arnvidr
Guru
Guru


Joined: 19 Aug 2004
Posts: 591
Location: Oslo, Norway

PostPosted: Thu Oct 28, 2004 9:43 pm    Post subject: Reply with quote

You're missing a comma

Quote:

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


Should be

Code:
None, Down, Alt_L|Right
Back to top
View user's profile Send private message
BootNinja
n00b
n00b


Joined: 19 Mar 2004
Posts: 53
Location: Lubbock, TX

PostPosted: Fri Oct 29, 2004 11:33 am    Post subject: Reply with quote

I figured it was something stupid like that. thanks a bundle. problem fixed.
Back to top
View user's profile Send private message
arnvidr
Guru
Guru


Joined: 19 Aug 2004
Posts: 591
Location: Oslo, Norway

PostPosted: Fri Oct 29, 2004 7:25 pm    Post subject: Reply with quote

I'm seeing weird shit here now:

My scroll-wheel, on scrolling down, not only does it scroll down, it also goes back one step in my browser history!!!

I have a 4-button mouse (one of them a scrollwheel) so I tried this configuration:


/etc/X11/Xmodmap:
Code:
pointer = 1 2 3 5 6 4


~/.imwheelrc:
Code:
".*"
 None, Up,   Button1|-Button1|Button1

"(null)"
 None, Up,   Button1|-Button1|Button1


That's for making the thumb-button doubleclick, see?

And in my initscript I have this:
Code:
imwheel -k -b "56" -f


Everything works the way it's supposed to, except that when scrolling down in firefox, it's as if I pressed Alt+Left at the same time. I figured there might be some funny business in /etc/X11/imwheel/imwheelrc, so I commented out everything in there, but still not any better. Any ideas?
Back to top
View user's profile Send private message
cdine
n00b
n00b


Joined: 11 Aug 2004
Posts: 2

PostPosted: Sun Nov 21, 2004 8:52 am    Post subject: Reply with quote

Cool, it all works great on my FreeBSD box as well.

I have a USB Explorer, and "Auto" works instead of "Explorer/PS2"

Thanks alot!
Back to top
View user's profile Send private message
hazelnusse
n00b
n00b


Joined: 22 Nov 2004
Posts: 19

PostPosted: Tue Dec 07, 2004 7:15 am    Post subject: Any idea why no output from wheel? Reply with quote

I have tried all sorts of tricks to get my wheel to work but to no avail. I have a Logitech MX 700. The weird thing is that when I do:

Code:
cat /dev/psaux


I get all sorts of output from just moving the mouse and clicking the buttons --- except NO output when I scroll the mouse wheel. Any ideas why this would be? I've gotten my thumb buttons to respond within KDE using various combinations of imwheel and modifying the XFree86 file, but nothing is getting any response from the wheel.

Is there a kernel option that is required to be compiled to get this to work? I only compiled the following into the kernel:
Code:

DEVICE DRIVERS-->Input Device Support-->
[*]   Provide legacy /dev/psaux device,     
[*] Mice
<*>   PS/2 mouse     

Should I have done more?

Luke

Gentoo 2.6.9-r9
Stage 1 BABY!
3D Acceleration in KDE with Ati Radeon 9600XT && kernel 2.6.9!!! -- booyah
Back to top
View user's profile Send private message
Krieger
n00b
n00b


Joined: 17 Sep 2004
Posts: 52

PostPosted: Tue Dec 28, 2004 6:35 pm    Post subject: Reply with quote

Hello.

I followed this guide, and my Intellimouse optical now works great in my browser.

I have a question for those more experienced than myself:

Q: Is there a way to map a specific button to a specific keystroke?
--> If so, how would one do it for a specific application?

Ex: I want to emerge the RTCW/ET FPS games. I need to map my mouse side buttons (forward/back for a browser) to the keystrokes 'o' and 'j'.

Please excuse the simple nature of my question, I'm still learning Linux in general and Gentoo in particular.

Any help is appreciated.
_________________
HW:Athlon XP 3800 | 2GB RAM | AN8SLI Premium | GeForce 7800 GT
Distro:Stage 1 | udev
Back to top
View user's profile Send private message
firephoto
Veteran
Veteran


Joined: 29 Oct 2003
Posts: 1599
Location: +48° 5' 23.40", -119° 48' 30.00"

PostPosted: Tue Dec 28, 2004 6:42 pm    Post subject: Reply with quote

Just go into the game settings and change the mapping for whatever action you want and it will show button 4 or button 5 or whatever button it detects. Games don't use your normal button mapping, they just use the raw button code.

If you want specific keystrokes for normal apps, you can use xbindkeys and xvkbd and it will map a button to a keystroke sequence. I use this for my forward/back/up functions in my browser/file manager since these are standard key sequences for many applications so I don't need app specific key commands.
Back to top
View user's profile Send private message
monotux
l33t
l33t


Joined: 09 Sep 2003
Posts: 751
Location: Stockholm, Sweden

PostPosted: Tue Dec 28, 2004 8:45 pm    Post subject: Reply with quote

Joffer wrote:
Why? Doesn't xfce4 support ~/.xinitrc? (Apparantly not, since I've got those line in my .xinitrc and it isn't invoced when I startxfce4.

Just a quick sidequstion - what should I put in XSESSION in rc.conf to start xfce4 as default?


You can append "startxfce4" to your ~/.xinitrc, and start x with "startx" (and yes, it does work) :)
_________________
Computer science is no more about computers than astronomy is about telescopes.
Back to top
View user's profile Send private message
Krieger
n00b
n00b


Joined: 17 Sep 2004
Posts: 52

PostPosted: Wed Dec 29, 2004 12:07 am    Post subject: Reply with quote

UPDATE:
The Linux version of RTCW (nicely) recognizes the mouse buttons. I will next emerge ET, which I'm sure will do the same. Now if only ATI would support Linux users and write some better video drivers for us ;).

Thank you for the assistance.

Quote:
Just go into the game settings and change the mapping for whatever action you want and it will show button 4 or button 5 or whatever button it detects. Games don't use your normal button mapping, they just use the raw button code.

If you want specific keystrokes for normal apps, you can use xbindkeys and xvkbd and it will map a button to a keystroke sequence. I use this for my forward/back/up functions in my browser/file manager since these are standard key sequences for many applications so I don't need app specific key commands.


Thank you for the response.

The reason I asked is because the two games mentioned contain no facility for changing the mapping as they do not acknowledge/recognize side mouse buttons at all- at least in MSWindows. I'll emerge the games and test for side button event recognition on my gentoo box (I'm trying to completely abandon use of Windows).

I will, however, look into xbindkeys.
_________________
HW:Athlon XP 3800 | 2GB RAM | AN8SLI Premium | GeForce 7800 GT
Distro:Stage 1 | udev
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 5 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