NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
X11 mystery mouse
Can someone point me to definitive X11 mouse documentation?
My X server is on OS X; my X clients are NetBSD. My hardware "mouse" has
only one button, and of course I use 3-button emulation, which *usually*
works. but sometimes it doesn't, and I'd like to at least understand why
not.
For example, most GTK applications work just fine. cmd-click behaves as
right-click (MB3) and opt-click behaves as middle-click (MB2). Openmotif
is simularly no problem; nedit works fine. And xterm is OK.
But some older applications/toolkits are useless: ImageMagick, dotty. I
can't use ImageMagick's menu at all. dotty doesn't seem to see
middle-click.
This suggests to me there's no One True Way to read mouse input. Perhaps
these older toolkits are looking for something lower-level than the
emulation provides.
Output of xev(1) appended below in case it's interesting.
--jkl
Control-click (doesn't emulate M2/3).
KeyPress event, serial 22, synthetic NO, window 0x1800001,
root 0x57, subw 0x0, time 44983680, (96,144), root:(120,208),
state 0x0, keycode 67 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
ButtonPress event, serial 24, synthetic NO, window 0x1800001,
root 0x57, subw 0x0, time 44986933, (96,144), root:(120,208),
state 0x4, button 1, same_screen YES
ButtonRelease event, serial 24, synthetic NO, window 0x1800001,
root 0x57, subw 0x0, time 44987112, (96,144), root:(120,208),
state 0x104, button 1, same_screen YES
KeyRelease event, serial 24, synthetic NO, window 0x1800001,
root 0x57, subw 0x0, time 44987781, (96,144), root:(120,208),
state 0x4, keycode 67 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
option-click (emulate middle button):
KeyPress event, serial 24, synthetic NO, window 0x1800001,
root 0x57, subw 0x0, time 44988203, (96,144), root:(120,208),
state 0x0, keycode 66 (keysym 0xff7e, Mode_switch), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 24, synthetic NO, window 0x1800001,
root 0x57, subw 0x0, time 44989159, (96,144), root:(120,208),
state 0x8, keycode 66 (keysym 0xff7e, Mode_switch), same_screen YES,
XLookupString gives 0 bytes:
ButtonPress event, serial 24, synthetic NO, window 0x1800001,
root 0x57, subw 0x0, time 44989159, (96,144), root:(120,208),
state 0x0, button 2, same_screen YES
ButtonRelease event, serial 24, synthetic NO, window 0x1800001,
root 0x57, subw 0x0, time 44989385, (96,144), root:(120,208),
state 0x200, button 2, same_screen YES
KeyPress event, serial 24, synthetic NO, window 0x1800001,
root 0x57, subw 0x0, time 44989385, (96,144), root:(120,208),
state 0x0, keycode 66 (keysym 0xff7e, Mode_switch), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 24, synthetic NO, window 0x1800001,
root 0x57, subw 0x0, time 44989922, (96,144), root:(120,208),
state 0x8, keycode 66 (keysym 0xff7e, Mode_switch), same_screen YES,
XLookupString gives 0 bytes:
command-click (emulate right button):
KeyPress event, serial 24, synthetic NO, window 0x1800001,
root 0x57, subw 0x0, time 45598539, (93,113), root:(117,177),
state 0x0, keycode 63 (keysym 0xffe7, Meta_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 24, synthetic NO, window 0x1800001,
root 0x57, subw 0x0, time 45599245, (93,113), root:(117,177),
state 0x10, keycode 63 (keysym 0xffe7, Meta_L), same_screen YES,
XLookupString gives 0 bytes:
ButtonPress event, serial 24, synthetic NO, window 0x1800001,
root 0x57, subw 0x0, time 45599245, (93,113), root:(117,177),
state 0x0, button 3, same_screen YES
ButtonRelease event, serial 24, synthetic NO, window 0x1800001,
root 0x57, subw 0x0, time 45599408, (93,113), root:(117,177),
state 0x400, button 3, same_screen YES
KeyPress event, serial 24, synthetic NO, window 0x1800001,
root 0x57, subw 0x0, time 45599408, (93,113), root:(117,177),
state 0x0, keycode 63 (keysym 0xffe7, Meta_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 24, synthetic NO, window 0x1800001,
root 0x57, subw 0x0, time 45600015, (93,113), root:(117,177),
state 0x10, keycode 63 (keysym 0xffe7, Meta_L), same_screen YES,
XLookupString gives 0 bytes:
In both emulated cases, the KeyRelease-ButtonPress-ButtonRelease-KeyPress
sequence happens on pressing the button. The surrounding press/release
pair comes from pressing/releasing the modifier key. I assume the
4-message sequence is meant to tell the application that the modifier is
*not* pressed, in cause it would react to that.
Home |
Main Index |
Thread Index |
Old Index