On Thu, Jun 21, 2001 at 02:46:40AM +0200, Andreas Beck wrote:
> xsendbut exists, as X doesn't know a mouse protocol with more than 3
> buttons, so more buttons are emulated using XSendEvent.
(This is kinda off-topic, but...)
I've managed to make X understand up to 5 of the 7 buttons on my mouse.
Section "InputDevice"
Identifier "USB Mouse"
Driver "mouse"
Option "CorePointer"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
Option "Buttons" "7"
# above line has no effect, by my tests
Option "ZAxisMapping" "4 5"
EndSection
--
Evan Martin - [EMAIL PROTECTED]
http://www.speakeasy.org/~martine
#!/usr/bin/env python
import gtk
def bpress(widget, event, caption):
caption.set_text(`event.button`)
caption = gtk.GtkLabel("[press a button]")
button = gtk.GtkButton()
button.add(caption)
button.connect("button-press-event", bpress, caption)
win = gtk.GtkWindow()
win.set_title("Button Test")
win.connect("delete-event", gtk.mainquit)
win.add(button)
win.set_border_width(10)
win.show_all()
gtk.mainloop()