ButtonMapping for a 5-button mouse

Phil Endecott spam_from_xorg at chezphil.org
Thu May 11 15:22:02 PDT 2006


Matthias Hopf wrote:
> Option "ButtonMapping" "1 2 2 3 8"
> 
> Meaning:
> - pressing phys. button 1 (left)   will create event 1 (left)
> - pressing phys. button 2 (wheel)  will create event 2 (middle/wheel)
> - pressing phys. button 3 (middle) will create event 2 (middle/wheel)
> - pressing phys. button 4 (right)  will create event 3 (right)
> - pressing phys. button 5 (thumb)  will create event 8 (unknown #1)

Thanks Matthias, this works.

My problem was that I assumed that the initial mapping was 1-1, 2-2 
etc., but it isn't.  So I thought that the extra buttons were physical 
buttons 8 and 9, when actually they were physical buttons 4 and 5.

My "man 4x mouse" actually says "default: 1-to-1 mapping" in the 
ButtonMapping section.  (Maybe I don't have the newest documentation.) 
Perhaps this can be changed?

Anyway, here is what I have settled on for now:

Section "InputDevice"
	Identifier	"Evoluent Vertical Mouse"
	Driver		"mouse"
	Option		"CorePointer"
	Option		"Device"		"/dev/input/mouse0"
	# You might expect 'Protocol USB' to work, but it doesn't
	Option		"Protocol"		"Auto"
	Option		"Emulate3Buttons"	"false"
	Option		"ButtonMapping"		"1 2 2 3 8"
	Option		"EmulateWheel"		"true"
	Option		"EmulateWheelButton"	"8"
EndSection



Thanks,

--Phil.




More information about the xorg mailing list