Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Trackball configuration in modular xorg.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
davidgurvich
Veteran
Veteran


Joined: 23 Apr 2004
Posts: 1063

PostPosted: Fri Apr 21, 2006 11:19 am    Post subject: Trackball configuration in modular xorg. Reply with quote

Update to earlier post: http://forums.gentoo.org/viewtopic-t-414623-highlight-emulatewheelbutton.html

There is no longer a need to makeup fake buttons in order to get scrolling to work. Xorg-7 starts by assigning 11 buttons, taking 4 5 6 7 as scroll buttons and leaving 7 physical buttons. There is no need to use xmodmap to modify what buttons point where as there seems to be a new option for that within xorg.conf, "ButtonMapping". In fact, without any editing xorg.conf seems to have the following default:
Option "ButtonMapping" "1 2 3 8 9 10 11"

For my trackball that is overkill, I have 4 physical buttons and the trackball itself. Here is the modified mouse section of my xorg.conf.
Quote:
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "CorePointer"
Option "Name" "Logitech USB Trackball"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "Buttons" "5"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "6"
Option "ZaxisMapping" "4 5"
Option "ButtonMapping" "1 2 3 6 7"
EndSection

Note that "Buttons" "5" adds an emulated middle click to the physical buttons available. I will probably modify the ButtonMapping line to read:
Quote:
Option "ButtonMapping" "1 7 3 6 2"

That is so that the small side buttons, 6 and 7, on my trackball will act as the emulatewheelbutton and middle click, respectively.
Back to top
View user's profile Send private message
davidgurvich
Veteran
Veteran


Joined: 23 Apr 2004
Posts: 1063

PostPosted: Fri Apr 21, 2006 11:31 am    Post subject: Reply with quote

A few side notes.

From the log, it appears that although I have set the buttons value to 5, giving me 7 in xorg-6.x, that I have had 2 buttons added afterwards.

In fact many of the settings in xorg.conf are changed. Although the setting given work and the trackball will not work properly without them, the log shows me 11 buttons after using my settings.
Back to top
View user's profile Send private message
davidgurvich
Veteran
Veteran


Joined: 23 Apr 2004
Posts: 1063

PostPosted: Sun Apr 23, 2006 3:51 am    Post subject: Modified configuration for vertical and horizontal scrolling Reply with quote

The following configuration allows both vertical and horizontal scrolling, and physical middle-click.
The trackball in question has 2 large side buttons, buttons 1 and 3, and 2 small side buttons, buttons 8 and 9.
The other values are 2 = middle-click, 4 and 5 are vertical up & down, 6 and 7 are horizontal up & down. Physical button 9 is remapped to 2, and physical button 8 is used as the emulation button for scrolling.
Quote:
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "CorePointer"
Option "Name" "Logitech USB Trackball"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "Buttons" "5"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "8"
Option "YaxisMapping" "4 5"
Option "XaxisMapping" "6 7"
Option "ButtonMapping" "1 9 3 8 2"
EndSection
Back to top
View user's profile Send private message
zaiyon
Apprentice
Apprentice


Joined: 19 May 2004
Posts: 219
Location: Germany

PostPosted: Sun Apr 23, 2006 9:45 am    Post subject: Reply with quote

Nice thread, but some people might, like me, prefer a setup where they can use the small buttons as scroll buttons.

I use my logitech marble mouse (4 physical buttons) like this right now:

button 1: left mouse
button 2: right mouse
button 1 + button 2 (pressed together): middle click
button 3: scroll down
button 4: scroll up

Note that you cannot hold a scroll button down to continue scrolling, you have to click it as long as you want to scroll. I would love to change that behaviour.

I have the following xorg.conf section:
Code:

Section "InputDevice"
  Identifier  "Mouse0"
  Driver      "mouse"
  Option      "CorePointer"
  Option      "Protocol" "auto"
  Option      "Device" "/dev/input/mice"
  Option      "Buttons" "5"
  Option      "ZAxisMapping" "4 5"
  Option      "ButtonMapping" "1 2 3 6 7"
EndSection


Scrolling does not work yet with this, I still need to use xmodmap after X startup:
Code:

xmodmap -e "pointer = 1 2 3 6 7 4 5 8 9 10 11"


Now it works, but the button labeld with the upper arrow scrolls down and the down button up. So this is my final xmodmap line:
Code:

xmodmap -e "pointer = 1 2 3 6 7 5 4 8 9 10 11"


I did some strange things. This is probably ugly, unelegant and redundant, but it works fine for me.
_________________
What do you have when you have six lawyers buried up to their necks in sand? Not enough sand.
My Project - open Outcast
Back to top
View user's profile Send private message
davidgurvich
Veteran
Veteran


Joined: 23 Apr 2004
Posts: 1063

PostPosted: Thu Apr 27, 2006 6:51 pm    Post subject: Reply with quote

The configuration that I provided allows scrolling using one side button and the trackball. It enables vertical and horizonal scrolling, if you don't mind holding a button down while using the trackball. I actually have trouble using an emulated middle-click, frequently not hitting both buttons in a close enough timespan, so having a physical button mapped to middle-click makes a lot of sense to me.
Back to top
View user's profile Send private message
clockwork06
n00b
n00b


Joined: 04 Jun 2006
Posts: 41

PostPosted: Sat Jul 08, 2006 2:17 am    Post subject: Reply with quote

Dave,
Your config works for me, sorta. When I click the little left button I get an 8 event, when I click the little right button I get a 9 and 2 event. This presents an issue since duplicate events cause funny things in certain programs (ie opening a new tab, and loading in a current tab). Is there a way that I can get this function set:
Big Left= left click (1)
Big Right= Right click (3)
little left= middle click (8)
little right= scroll with trackball (9 2 )

Currently I have the following:
Code:
Driver "mouse"
       Option "CorePointer" "false"
       Option "Device" "/dev/input/mouse2"
       Option "Protocol" "auto"
       Option "Buttons" "5"
       Option "EmulateWheel" "true"
       Option "EmulateWheelButton" "9"
       Option "YaxisMapping" "4 5"
       Option "XaxisMapping" "6 7"
       Option "ButtonMapping" "1 8 3 9 2"
EndSection


I would assume that swapping 8 and 9 should work, but I still get duplicate events. Nobody has an explination as to what position coresponds to what on the buttonmapping line. So any help is appreciated.
Back to top
View user's profile Send private message
Eglathôlion
n00b
n00b


Joined: 18 Oct 2004
Posts: 6
Location: Germany

PostPosted: Thu Jul 27, 2006 12:45 am    Post subject: Reply with quote

Hi!

clockwork06 wrote:
When I click the little left button I get an 8 event, when I click the little right button I get a 9 and 2 event. This presents an issue since duplicate events cause funny things in certain programs (ie opening a new tab, and loading in a current tab). Is there a way that I can get this function set:
[...]
I would assume that swapping 8 and 9 should work, but I still get duplicate events.


I tried nearly every possible combination in the last 8 hours. :(
It seems not to be possible, to get the buttons 8 and 9 pressed without sending another event with it.

Most of the time, button 8 acted like button one, so that a link was pressed while scrolling over it (eg. with zaiyons config and IIRC one of daves). Button 3 opened the link in a new tab.
Another behavior was that my browser acted as if I pressed the back or forward button while scrolling. That was with one of daves configs (I cannot remember, if it was the one with or without horizontal scrolling. Can't think no more :? ).

If I use a mouse or a trackball with a normal wheel, only 4 and 5 are used - as it should be. :roll: And I think that is how it was handled in xorg 6.8 (can someone verify that?).
Why did that change for my beloved Marble Mouse with xorg 7.0? :cry:

Best regards...
Ace
_________________
GCS d--- s: a29 C++++ UL++++ P>+ L+++ !E--- W+++@ N++ o? K+++ !w--- O@ !M
V-- PS+++ PE Y? PGP+++ t++(+) 5 X+++@ R+* tv- b+++ DI D+ G+ e? h r++ y+
Back to top
View user's profile Send private message
Eglathôlion
n00b
n00b


Joined: 18 Oct 2004
Posts: 6
Location: Germany

PostPosted: Wed Sep 20, 2006 11:12 pm    Post subject: [solved] Reply with quote

I finally solved it:

According to this, the reason for this behaviour is:

Quote:

In X.Org 6.9/7.0 RC3, upstream made changes to the mouse button handling.
The default ZAxisMapping is "4 5 6 7", accommodating scroll wheels with two
axes.
[...]
Mozilla uses buttons 6 and 7 for
"forward" and "back", but this doesn't work anymore, since those buttons
are now assumed to represent the horizontal axis of the scroll wheel


The solution is to turn off the back/forward functions of buttons 6 and 7 in your browsers.

In Opera you can simply edit the preferences or the config file standard_mouse.ini.
In Mozilla you need to configure via about:config.

I used this wiki for my new values:
http://www.thinkwiki.org/wiki/How_to_configure_the_TrackPoint

Best regards...
Ace

Google Keywords: mouse scroll wheel up browser back button 6 7 x.org xorg 6.9 7.0 7.1 7.x mozilla firefox opera
_________________
GCS d--- s: a29 C++++ UL++++ P>+ L+++ !E--- W+++@ N++ o? K+++ !w--- O@ !M
V-- PS+++ PE Y? PGP+++ t++(+) 5 X+++@ R+* tv- b+++ DI D+ G+ e? h r++ y+
Back to top
View user's profile Send private message
Xichekolas
n00b
n00b


Joined: 18 Aug 2006
Posts: 3

PostPosted: Mon Nov 27, 2006 9:17 am    Post subject: Reply with quote

I have a MS Intellimouse Optical. It has a wheel, two main buttons, and a side button on each side. The wheel is also clickable. To get Back and Forward functionality in Firefox with the two side buttons, I use the following mouse config in xorg.conf.

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5 8 9"
Option "ButtonMapping" "1 2 3 6 7 10 11"
EndSection

Just thought someone out there might enjoy that.
_________________
54
Back to top
View user's profile Send private message
mezoko
n00b
n00b


Joined: 16 Jan 2007
Posts: 4

PostPosted: Tue Jan 16, 2007 11:26 pm    Post subject: Reply with quote

Logitech Marble Mouse - USB (not using the PS/2 adapter)

Middle Click = Press both left and right
Scroll = Press small button on left side, use trackball to move up and down
Code:

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option "Device" "/dev/input/mice"
        Option "Protocol" "ExplorerPS/2"
        Option "Buttons" "9"
        Option "ZAxisMapping" "4 5"
        Option "EmulateWheel" "1"
        Option "EmulateWheelButton" "8"
EndSection

If you want to scroll with the right small button you can change
Code:
Option "EmulateWheelButton" "8"
to
Code:
Option "EmulateWheelButton" "9"

I am using Xorg 7.1
Back to top
View user's profile Send private message
mackerel
Apprentice
Apprentice


Joined: 09 Aug 2005
Posts: 167
Location: SC

PostPosted: Tue Aug 14, 2007 12:01 am    Post subject: kernel version?? Reply with quote

I used this post to get my marble mouse working a long time ago. However, with recent kernel updates (anything past 2.6.18-r6), the scroll no longer works. As long as I boot into the older kernel, it works fine. Has anyone had this issue? Are there any changes (from the beginning of the post) that I need to make for recent kernel changes?

Thanks,

Mack
_________________
Mack
Back to top
View user's profile Send private message
mezoko
n00b
n00b


Joined: 16 Jan 2007
Posts: 4

PostPosted: Tue Aug 14, 2007 10:13 am    Post subject: Reply with quote

I am not using gentoo anymore, but using my configuration up above I have not noticed any problems. I am currently running 2.6.22-Arch, though I've also have ran a believe vanilla sources and viper sources with kernels 2.6.18+ and not had any problems.
Back to top
View user's profile Send private message
mackerel
Apprentice
Apprentice


Joined: 09 Aug 2005
Posts: 167
Location: SC

PostPosted: Tue Aug 14, 2007 10:24 pm    Post subject: Reply with quote

mezoko - when I use your config instead of the origional post, I do have scroll. Not exactly the same type of scroll. With the old config, when I scroll the pointer remains stationary and the page scrolls. With your config, both the pointer and page scrolls (this is also with the new kernel). I prefer the old settings with newer kernels. I could hang on to my old kernel, but I assume at some point I will have to upgrade.

Thanks,

Mack
_________________
Mack
Back to top
View user's profile Send private message
mackerel
Apprentice
Apprentice


Joined: 09 Aug 2005
Posts: 167
Location: SC

PostPosted: Thu Sep 27, 2007 10:03 am    Post subject: solved Reply with quote

For anyone who also has this issue, I was able to fix it.
This apparently was because of my second mouse using the same driver/protocol.
I installed a new mouse to replace the secondary mouse (not the marble mouse). In the configuration wiki, the evdev driver is used. By switching the secondary mouse to another driver it works as expected. -wierd

Quote:

Section "InputDevice"
identifier "MarbleMouse"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "Buttons" "5"
Option "ButtonMapping" "1 8 3 2 9"
Option "EmulateWheel" "true"
Option "EmulateWheelTimeout" "300" # msec
Option "EmulateWheelButton" "2"
Option "YAxisMapping" "4 5"
Option "XAxisMapping" "6 7"
EndSection


Quote:

Section "InputDevice"
Identifier "Cordless Optical Trackman"
Driver "evdev"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
Option "Buttons" "10"
Option "ButtonMapping" "1 3 2 4 5 8 9 7 6 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32"
EndSection

_________________
Mack
Back to top
View user's profile Send private message
davidgurvich
Veteran
Veteran


Joined: 23 Apr 2004
Posts: 1063

PostPosted: Thu Sep 27, 2007 12:55 pm    Post subject: Reply with quote

Are there really 32 button options for your setup? That's almost a keyboards worth. Do you think you can take 10 buttons and set up a number pad?
Back to top
View user's profile Send private message
mackerel
Apprentice
Apprentice


Joined: 09 Aug 2005
Posts: 167
Location: SC

PostPosted: Thu Sep 27, 2007 2:19 pm    Post subject: Reply with quote

I just copied it from the guide.
It worked, I didn't notice any issues, so I left it. I also though it was a bit excessive, but I can't complain.
_________________
Mack
Back to top
View user's profile Send private message
calande
n00b
n00b


Joined: 08 Dec 2003
Posts: 54
Location: Old Europe

PostPosted: Tue Oct 23, 2007 9:31 pm    Post subject: Reply with quote

Hello guys, I have that Kensington Turbo Mouse PRO trackball with a marble and 4 large buttons around it. How can I set them up this way?

  • Button #1 -> Click
  • Button #2 -> Right-Click
  • Button #3 -> Double-Click
  • Button #4 -> Close active application window


:?:

Thanks,
Back to top
View user's profile Send private message
davidgurvich
Veteran
Veteran


Joined: 23 Apr 2004
Posts: 1063

PostPosted: Thu Oct 25, 2007 9:14 pm    Post subject: Reply with quote

Cross pollination has occured. This post was used in http://gentoo-wiki.com/Talk:HOWTO_Advanced_Mouse#No_more_need_for_xmodmap.3F with an addon.
Quote:
The EmulateWheelInertia is just about how fast the scroll works. And then that last setting is where it gets interesting.

"EmulateWheelTimeout" means that if I hold that button down for less than 200 milliseconds then instead of doing the wheel emulation (by sending button 4 or 5 events), it sends a button 8 event. We'll get to that in a sec, for now that's all the xorg.conf settings, save, restart, etc.. Your MarbleFX will now do wheel scroll with the red button.
What you want may be there.

xbindkeys and xautomation is used.
Back to top
View user's profile Send private message
divago
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jun 2010
Posts: 84

PostPosted: Fri Jun 04, 2010 11:59 pm    Post subject: Reply with quote

Hi all
some time ago (about one-ona and half year ago) i used this trackball on Fedora first, then on Gentoo when i evolved into Gentoo
i was used to tweak xorg.conf for some reason so i found really useful and easy to configure this trackball just adding few lines into xorg.conf

then i stopped using linux for work and got really low time to use it for pleasure, and i started again working on it one month ago. Yesterday i completed my first gentoo installation "all alone" :) (well, technically i'm still emerging something... >.> )
i had really really big problem configuring Trackball: it seems ignoring xorg parameters, and adding this lines to xorg seems useless

btw i discovered problem is hal, so i googled a little more and found this guide: http://www.robmeerman.co.uk/unix/xinput
i followed the steps (you need to create a /etc/hal/fdi/policy/10-marblemouse.fdi file with some hal configuration...)
and now it work!!! :)

following step by step the guide i got:
big button: right and left click
small button left: enable scroll vertical and horizontal
small button right: middle click

i hope this could be useful for you too :)

Oh and i had to change some opera configuration that caused small button to go back/forward
(in opera you need to go preferences; in firefox i think there are somethint in about:config interface...)
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
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