Setting the mouse buttons?

Questions about hardware, drivers and peripherals
Forum rules
Before you post please read how to get help
Post Reply
donkeyhottie
Level 1
Level 1
Posts: 22
Joined: Wed Jul 25, 2012 11:52 am
Contact:

Setting the mouse buttons?

Post by donkeyhottie »

I use Linux Mint 13 Maya Cinnamon 64bit on an Acer Desktop with Intel i7 cpu. I have a Logitech G5 laser mouse, which I'm now trying to configure. I use Cairo Dock in OpenGL mode.

Code: Select all

jarif@whirlwind:~$ uname -a
Linux whirlwind 3.2.0-27-generic #43-Ubuntu SMP Fri Jul 6 14:25:57 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
I'm a fresh convert from Windows 7 Ultimate. Windows has the Logitech software, and mouse works as designed. While Mint has most thing right with my hardware, the mouse causes lots of pain.

I can't get the buttons to work as I want. I have googled, and I have asked for help in #linuxmint-help but still left empty handed, no solution found.

My setup now

xorg.conf

Code: Select all

jarif@whirlwind:~$ cat /etc/X11/xorg.conf

Section "Device"
	Identifier	"Default Device"
	Option	"NoLogo"	"True"
EndSection

Section "InputDevice"
	Identifier "Mouse0"
	Driver "evdev"
	Option "Device" "/dev/input/event3"
	Option "CorePointer"
	Option "ZAxisMapping" "4 5"
	Option "HWheelRelativeAxisButtons" "7 6"
	Option "Buttons" "10"
	Option "Protocol" "auto"
	Option "Emulate3Buttons" "no"
EndSection
My ~/.Xmodmap says

Code: Select all

jarif@whirlwind:~$ cat .Xmodmap 
pointer = 1 6 3 4 5 8 9 2 7
Mouse works for most part fine. (I now wonder if I should have something for screen in that conf, but that's all there is).

I want my scroll tilts to be Ctrl+Back & Ctrl+Forward, and that magically is so. I have not done anything for that.

I also want by thumb buttons to be Home and End. That does not work. The buttons do something, but I'm not sure what they do.

After asking help in IRC and googling, I have installed xbindkeys, xev, imwheel, xvkbd, xte and desperate retry again. Nothing helps.

I feel that no matter how I configure those tools, they change nothing. The mouse buttons just not change.

My .xbindkeysrc is now

Code: Select all

keystate_numlock = enable
keystate_capslock = enable
keystate_scrolllock= enable

#"xvkbd  -text "\[Home]""
"xterm"
      m:0x0 + b:7
#
#"xvkbd  -text "\[End]""
"xterm"
      m:0x0 + b:2
#       

"xte 'keyup Home'"
 # b:7 + release
  b:8
  
"xte 'keyup End'"
#  b:2 + release
  b:9
  
#"xte 'keydown Alt_L' 'key Left' 'keyup Alt_L'"
#  b:8
# Forward
#"xte 'keydown Alt_L' 'key Right' 'keyup Alt_L'"
#  b:9

#"xterm -geom 50x20+20+20"
#   Shift+Mod2+alt + s
#
## set directly keycode (here control+alt+mod2 + f with my keyboard)
#"xterm"
#  alt + c:0x29 + m:4 + mod2
#
## Control+Shift+a  release event starts rxvt
#"rxvt"
#  release+control+shift + a
#
## Control + mouse button 2 release event starts rxvt
#"rxvt"
#  Control + b:2 + Release
Most stuff is commented out now, and they did not work. Nothing happened.

xev reports those thumb buttons as buttons 7 & 2. Nothing catches such events, and my retries are void.

I hope I have all stuff covered now, and I hope some help from Mint community, to get my work rig fully functional. I have worked with Linux since 1994, but this is first time with GUI. Console is familiar...
Teaker1s
Level 1
Level 1
Posts: 26
Joined: Tue Jul 24, 2012 9:32 am

Re: Setting the mouse buttons?

Post by Teaker1s »

https://help.ubuntu.com/community/ManyButtonsMouseHowto

If you can see kernel response using xev you can either xmodmap as I did years ago

or

http://ubuntuforums.org/showthread.php?t=172010
donkeyhottie
Level 1
Level 1
Posts: 22
Joined: Wed Jul 25, 2012 11:52 am
Contact:

Re: Setting the mouse buttons?

Post by donkeyhottie »

That tells again to run "imwheel -c". It just coredumps. No help with that :(
Teaker1s wrote: If you can see kernel response using xev you can either xmodmap as I did years ago
Kernel response? xev outputs data to screen, and there I can see button 2 & 7 for the buttons I want. I have tried to catch those buttons with the mentioned tools, but seems nothing really works. The buttons do activate.
Teaker1s
Level 1
Level 1
Posts: 26
Joined: Tue Jul 24, 2012 9:32 am

Re: Setting the mouse buttons?

Post by Teaker1s »

If you can see an output from key when pressed it shows the kernel recognizes it being pressed but nothing else happens- it has not mapped it yet to an action.

I'm struggling to understand if you can see response why it can't be mapped?
donkeyhottie
Level 1
Level 1
Posts: 22
Joined: Wed Jul 25, 2012 11:52 am
Contact:

Re: Setting the mouse buttons?

Post by donkeyhottie »

Well, I'm getting imwheel working now, slowly and painfully ;)

Enabled it in /etc/X11/Xsession.d/60imwheel_start-imwheel and now I got the Home and End to some buttons, but not where I wanted them ;) I guess those buttons near my thumb are not called Thumb1 and Thumb2 in imwheel... Pressing the scroll tilt activates them. I want them, but not on those keys. And I want "previous page" and "next page" to those now active keys... those worked before right, but not more..

Trying to figure out the correct button names..
donkeyhottie
Level 1
Level 1
Posts: 22
Joined: Wed Jul 25, 2012 11:52 am
Contact:

Re: Setting the mouse buttons?

Post by donkeyhottie »

And now the ctrl+scroll does not work anymore...

I guess it works in Linux apps too, zoom in web browser?

Anyhow, current imwheelrc

Code: Select all

".*"
None, Thumb1, Control_L|Left
None, Thumb2, Control_L|Right
None, ExtBt7, Home
None, ExtBt8, End
The Thumb1&2 now work as I want, but the rest not.
donkeyhottie
Level 1
Level 1
Posts: 22
Joined: Wed Jul 25, 2012 11:52 am
Contact:

Re: Setting the mouse buttons?

Post by donkeyhottie »

Finally! I got it thanks to http://www.glaurung.demon.co.uk/info/li ... howto.html

Very good page that!

My config was a mes because all the earlier testing, but cleaned it up thanks to that page.

My config now (for some other who might need it).

** /etc/X11/xorg.conf **

Code: Select all

Section "Device"
	Identifier	"Default Device"
	Option	"NoLogo"	"True"
EndSection

Section "InputDevice"
	Identifier "Mouse0"
	Driver "evdev"
	Option "Device" "/dev/input/event3"
	Option "CorePointer"
#	Option "ZAxisMapping" "4 5"
	Option "ZAxisMapping" "6 7"
#	Option "HWheelRelativeAxisButtons" "7 6"
	Option "Buttons" "10"
	Option "Protocol" "auto"
	Option "Emulate3Buttons" "no"
EndSection
** /etc/X11/imwheel/imwheelrc ** (this added to the beginnin of the file, I left the defaults there)

Code: Select all

".*"
None,	Thumb1,	End
None,	Thumb2,	Home
None,	Left,		Control_L|Left
None,	Right,	Control_L|Right
Control_L,	Down,	Control_L|KP_Subtract
Control_L,	Up,		Control_L|KP_Add
The tutorial mentioned maps buttons using xmodmap, but I find there no need for that. It just works as written.

That's all.
Post Reply