Bug 174395 - KeyPress order matters when changing workspaces using Shift+Meta_L+[arrows]
KeyPress order matters when changing workspaces using Shift+Meta_L+[arrows]
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: xorg-x11-xkbdata (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mike A. Harris
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-11-28 14:33 EST by James Laska
Modified: 2013-09-02 02:07 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 05:29:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description James Laska 2005-11-28 14:33:42 EST
I noticed that my metacity workspace change keystrokes behave differently
recently.  It seems to have started after recent xorg-x11 modularization, but I
don't have any proof to back up that claim.  It seems that the order of the
keypress events I use to change viewports now matters.  

I use Shift+Meta_L+[arrows] to change viewports.  It used to be that I could
type "Shift+Meta_L+Left" and "Meta_L+Shift+Left" and they would result in the
same behavior.  That does not appear to be the case anymore.  

Using the following gconf metacity bindings
($HOME/.gconf/apps/metacity/global_keybindings/%gconf.xml)
==========================================================
        <entry name="switch_to_workspace_down" mtime="1119030270" type="string">
                <stringvalue>&lt;Shift&gt;&lt;Alt&gt;Down</stringvalue>
        </entry>
        <entry name="switch_to_workspace_up" mtime="1119030269" type="string">
                <stringvalue>&lt;Shift&gt;&lt;Alt&gt;Up</stringvalue>
        </entry>
        <entry name="switch_to_workspace_right" mtime="1119030267" type="string">
                <stringvalue>&lt;Shift&gt;&lt;Alt&gt;Right</stringvalue>
        </entry>
        <entry name="switch_to_workspace_left" mtime="1119030265" type="string">
                <stringvalue>&lt;Shift&gt;&lt;Alt&gt;Left</stringvalue>
        </entry>


Steps to Reproduce:
=======================
 1) With the above metacity keybindings
 2) hit and hold Meta_L (Left Alt)
 3) hit and hold Shift (Left Shift)
 4) hit Left arrow key
 --- now using other order ---
 5) hit and hold Shift (Left Shift)
 6) hit and hold Meta_L (Left Alt)
 7) hit Right arrow key

Expected results
=======================
Using the keybindings and the above keypress events your metacity viewport
should have moved one to the left, and one to the right. Steps 1-4 are working
fine for me, however 5-7 are no longer behaving as expected.


I have attempted to grab output from xev in hopes that will help diagnose if
this is operator error (me) or something else at work.

============================================
=== WORKS  "Meta_L+Shift+Left"
============================================
KeyPress event, serial 29, synthetic NO, window 0x2400001,
    root 0x4c, subw 0x0, time 3628913936, (0,100), root:(5,637),
    state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 29, synthetic NO, window 0x2400001,
    root 0x4c, subw 0x0, time 3628914056, (0,100), root:(5,637),
    state 0x8, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

FocusOut event, serial 29, synthetic NO, window 0x2400001,
    mode NotifyGrab, detail NotifyAncestor

LeaveNotify event, serial 29, synthetic NO, window 0x2400001,
    root 0x4c, subw 0x0, time 3628915005, (0,100), root:(5,637),
    mode NotifyGrab, detail NotifyAncestor, same_screen YES,
    focus YES, state 9

FocusOut event, serial 29, synthetic NO, window 0x2400001,
    mode NotifyWhileGrabbed, detail NotifyNonlinear

UnmapNotify event, serial 29, synthetic NO, window 0x2400001,
    event 0x2400001, window 0x2400001, from_configure NO

PropertyNotify event, serial 29, synthetic NO, window 0x2400001,
    atom 0x8d (WM_STATE), time 3628915175, state PropertyNewValue

PropertyNotify event, serial 29, synthetic NO, window 0x2400001,
    atom 0x10d (_NET_WM_STATE), time 3628915176, state PropertyNewValue

MapNotify event, serial 29, synthetic NO, window 0x2400001,
    event 0x2400001, window 0x2400001, override NO

VisibilityNotify event, serial 29, synthetic NO, window 0x2400001,
    state VisibilityUnobscured

Expose event, serial 29, synthetic NO, window 0x2400001,
    (0,0), width 178, height 10, count 3

Expose event, serial 29, synthetic NO, window 0x2400001,
    (0,10), width 10, height 58, count 2

Expose event, serial 29, synthetic NO, window 0x2400001,
    (68,10), width 110, height 58, count 1

Expose event, serial 29, synthetic NO, window 0x2400001,
    (0,68), width 178, height 110, count 0

PropertyNotify event, serial 29, synthetic NO, window 0x2400001,
    atom 0x8d (WM_STATE), time 3628918240, state PropertyNewValue

PropertyNotify event, serial 29, synthetic NO, window 0x2400001,
    atom 0x10d (_NET_WM_STATE), time 3628918243, state PropertyNewValue

FocusIn event, serial 29, synthetic NO, window 0x2400001,
    mode NotifyNormal, detail NotifyNonlinear

KeymapNotify event, serial 29, synthetic NO, window 0x0,
    keys:  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

PropertyNotify event, serial 29, synthetic NO, window 0x2400001,
    atom 0x14b (_NET_WM_ICON_GEOMETRY), time 3628918272, state PropertyNewValue

PropertyNotify event, serial 29, synthetic NO, window 0x2400001,
    atom 0x14b (_NET_WM_ICON_GEOMETRY), time 3628918313, state PropertyNewValue

FocusOut event, serial 29, synthetic NO, window 0x2400001,
    mode NotifyNormal, detail NotifyNonlinear

PropertyNotify event, serial 29, synthetic NO, window 0x2400001,
    atom 0x14b (_NET_WM_ICON_GEOMETRY), time 3628919350, state PropertyNewValue

FocusIn event, serial 29, synthetic NO, window 0x2400001,
    mode NotifyNormal, detail NotifyNonlinear

KeymapNotify event, serial 29, synthetic NO, window 0x0,
    keys:  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

EnterNotify event, serial 29, synthetic NO, window 0x2400001,
    root 0x4c, subw 0x0, time 3628919788, (176,54), root:(181,591),
    mode NotifyNormal, detail NotifyAncestor, same_screen YES,
    focus YES, state 0

KeymapNotify event, serial 29, synthetic NO, window 0x0,
    keys:  76  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

MotionNotify event, serial 29, synthetic NO, window 0x2400001,
    root 0x4c, subw 0x0, time 3628919795, (174,54), root:(179,591),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 29, synthetic NO, window 0x2400001,
    root 0x4c, subw 0x0, time 3628919802, (173,54), root:(178,591),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 29, synthetic NO, window 0x2400001,
    root 0x4c, subw 0x0, time 3628919831, (170,54), root:(175,591),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 29, synthetic NO, window 0x2400001,
    root 0x4c, subw 0x0, time 3628919834, (169,54), root:(174,591),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 29, synthetic NO, window 0x2400001,
    root 0x4c, subw 0x0, time 3628919866, (167,54), root:(172,591),
    state 0x0, is_hint 0, same_screen YES

PropertyNotify event, serial 29, synthetic NO, window 0x2400001,
    atom 0x14b (_NET_WM_ICON_GEOMETRY), time 3628919871, state PropertyNewValue

============================================
=== DOES NOT WORK  "Shift+Meta_L+Left"
============================================
KeyPress event, serial 29, synthetic NO, window 0x2400001,
    root 0x4c, subw 0x0, time 3628921908, (167,55), root:(172,592),
    state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 29, synthetic NO, window 0x2400001,
    root 0x4c, subw 0x0, time 3628921992, (167,55), root:(172,592),
    state 0x1, keycode 64 (keysym 0xffe7, Meta_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 29, synthetic NO, window 0x2400001,
    root 0x4c, subw 0x0, time 3628922252, (167,55), root:(172,592),
    state 0x1, keycode 100 (keysym 0xff51, Left), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 29, synthetic NO, window 0x2400001,
    root 0x4c, subw 0x0, time 3628922392, (167,55), root:(172,592),
    state 0x1, keycode 100 (keysym 0xff51, Left), same_screen YES,
    XLookupString gives 0 bytes:
Comment 1 James Laska 2005-11-28 14:50:55 EST
Further investigation reveals that the keycode is different when I use a
different keypress order.  For example:

- Pressing "Meta_L+Shift+Left" shows up in `xev` as Alt_L, Shift_L
- Pressing "Shift+Meta_L+Left" shows up in `xev` as Shift_L, Meta_L

Is this a changed behavior from before?  I didn't think that shift would act as
a modifier for the alt key?  Perhaps it would be helpful to look at my `xmodmap`

xmodmap:  up to 3 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x6d)
mod1        Alt_L (0x40),  Alt_L (0x7d),  Meta_L (0x9c)
mod2        Num_Lock (0x4d)
mod3
mod4        Super_L (0x7f),  Hyper_L (0x80),  Super_L (0x73)
mod5        Mode_switch (0x5d),  ISO_Level3_Shift (0x7c)

Sure enough, using gnome-keybinding-properties, changing the order of the key
press (swapping order of Shift and Alt keys) changes what keys it thinks were
pressed.  

I just tested the keypress ordering on a Red Hat Enterprise Linux 4 Update 2
system and it appears to not care which order I hit Alt and Shift in.
Comment 2 Mike A. Harris 2006-01-31 20:30:12 EST
Please report this issue to X.Org developers by filing a bug report in
the X.Org bugzilla located at http://bugs.freedesktop.org in the "xorg"
component.

Once you've filed your bug report to X.Org, if you paste the new
bug URL here, Red Hat will continue to track the issue in the
centralized X.Org bug tracker, and will review any bug fixes that
become available for consideration in future updates.

Setting status to "NEEDINFO_REPORTER", awaiting X.Org bug URL
for tracking.
Comment 3 Mike A. Harris 2006-02-21 05:29:40 EST
FC5test3 has now been released, which might resolve this issue.  Please update
to FC5test3, and if the problem persists, file a bug report in the X.Org
bugzilla at http://bugs.freedesktop.org in the "xorg" component.

Once you've filed your bug report to X.Org, if you paste the new
bug URL here, Red Hat will continue to track the issue in the
centralized X.Org bug tracker, and will review any bug fixes that
become available for consideration in future updates.

Setting status to "RAWHIDE".

Note You need to log in before you can comment on or make changes to this bug.