[Xquartz-dev] 2.3.1_beta2

Martin Costabel costabel at wanadoo.fr
Fri Aug 15 14:21:22 PDT 2008


Jeremy Huddleston wrote:
> 
> On Aug 15, 2008, at 05:34, Martin Costabel wrote:
>>
>> Look at the emulation of button2 via alt-click:
>> If I press alt+some key, I get a KeyPress event with "state 0x2000", but
>> alt+click gives a ButtonPress event with "state 0x0". This is as it
>> should be.
> 
> You should not have state 0x2000 with alt.  You should have 0x8, and 
> there's no reason the states should be different.  I'm not treating the 
> two any differently.
> 
> Do you have a special ~/.Xmodmap (run 'xmodmap' at the terminal and tell 
> me what it says)?  What's your OSX keyboard layout?

I have a "US international" keyboard (that's the one with "~`" to the
left of "z", and a superfluous "±§" key to the left of "1" where "~`"
should be,). The "mouse button" is the trackpad button. "Click" means
pressing this button. There is no ~/.Xmodmap. xmodmap says:

costabel% xmodmap
xmodmap:  up to 2 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x40),  Shift_R (0x44)
lock        Caps_Lock (0x41)
control     Control_L (0x43),  Control_R (0x46)
mod1        Mode_switch (0x42),  Mode_switch (0x45)
mod2        Meta_L (0x3f),  Meta_R (0x47)
mod3
mod4
mod5

To reiterate what I see with xev:

The "alt" key gives status 0x2000 with other keys, for example:
alt-a gives "state 0x2000, keycode 8 (keysym 0xe5, aring)",
ctl-alt-a gives "state 0x2004, keycode 8 (keysym 0x61, a)"

It gives "status 0x0" with mouse click, thus
alt-click gives "state 0x0, button 2", and
ctl-alt-click gives "state 0x4, button 2"

This is the same in xquartz-2.3.0 and 2.3.1beta2 and, as far as I can
tell, in all previous Leopard X11 versions. The only "novelty" in
xquartz-2.3.0 was that it introduced a spurious ButtonRelease event when
the button was not yet released.

The "cmd" key gives status 0x10, for example:
cmd-a gives "state 0x10, keycode 8 (keysym 0x61, a)",
ctl-cmd-a gives "state 0x14, keycode 8 (keysym 0x61, a)".

In previous versions of X11, up to xquartz-2.3.0,
cmd-click gives "status 0x0, button 3", and
ctl-cmd-click gives "state 0x4, button 3".

In 2.3.1beta2,
cmd-click gives "status 0x10, button 3", and
ctl-cmd-click gives "state 0x14 button 3".

>> For cmd+some key, I get "state 0x10", and cmd+click gives "state 0x10",
>> too, which is wrong. In all previous versions of Apple's or xquartz's
>> X11 up to and including xquartz-2.3.0, it was "state 0x0".
> 
> It is correct that up to and including 2.3.0 it was state 0x0, but all 
> those versions had a bug which I'm trying to address, the emulated 
> button click was always a "modifier-release, down, up, modifier press" 
> on the mouse-down.  There was no way to "hold" button2 or button3.  Yes, 

No. This was the case *only* in 2.3.0, not in previous versions, up to
2.2.3. In Apple's X11 with "X.Org X Server 1.4.2-apple5", for example, I 
see the "modifier release, down" part on mouse down, but the "up, 
modifier press" part not before mouse up. I think this is how it has 
always been.

The side effect in the old way is, of course, that if you press 
alt-click-a, you get "a" and not "alt-a = å". But who would do this anyway?

-- 
Martin







More information about the Xquartz-dev mailing list