On Wed, Sep 30, 2020 at 08:56:56AM +0200, Matthieu Herrb wrote:
> Could you check with xev which keysyms are produced by M-slash before
> and after changing the XKB config ?
Each time I run xev(1) in an xterm, move the cursor into its window's
upper left black box, perform the M-slash keybinding and hit escape to
exit cwm's prompt;  then I move the cursor back into xterm and quit xev
with ^C.

After clean boot with default "us" keymap here M-slash effectively means
`<Alt>/' on my keyboard:

        $ xev -event keyboard 2>&1 | tee xev.us.working
        Outer window is 0x800001, inner window is 0x800002

        KeymapNotify event, serial 18, 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   

        KeymapNotify event, serial 18, 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   

        KeyPress event, serial 25, synthetic NO, window 0x800001,
            root 0x2d5, subw 0x800002, time 2707142, (40,38), root:(271,277),
            state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
            XLookupString gives 0 bytes: 
            XmbLookupString gives 0 bytes: 
            XFilterEvent returns: False

        KeymapNotify event, serial 26, synthetic NO, window 0x0,
            keys:  4294967253 2   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   

        KeymapNotify event, serial 26, synthetic NO, window 0x0,
            keys:  4294967253 2   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   

        KeyRelease event, serial 28, synthetic NO, window 0x800001,
            root 0x2d5, subw 0x800002, time 2713421, (40,38), root:(271,277),
            state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
            XLookupString gives 1 bytes: (1b) ""
            XFilterEvent returns: False

        KeymapNotify event, serial 28, synthetic NO, window 0x0,
            keys:  4294967253 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   

Now after switching to german where I type `<Alt><Shift>7' this time as
the slash moved on my keyboard:

        $ setxkbmap de
        $ xev -event keyboard 2>&1 | tee xev.de.working
        Outer window is 0x800001, inner window is 0x800002

        KeymapNotify event, serial 24, 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   

        KeymapNotify event, serial 24, 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   

        KeyPress event, serial 25, synthetic NO, window 0x800001,
            root 0x2d5, subw 0x800002, time 2746118, (37,35), root:(161,286),
            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 28, synthetic NO, window 0x800001,
            root 0x2d5, subw 0x800002, time 2747631, (37,35), root:(161,286),
            state 0x8, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
            XLookupString gives 0 bytes: 
            XmbLookupString gives 0 bytes: 
            XFilterEvent returns: False

        KeymapNotify event, serial 28, synthetic NO, window 0x0,
            keys:  4294967253 2   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   

        KeymapNotify event, serial 28, synthetic NO, window 0x0,
            keys:  4294967253 2   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   

        KeyRelease event, serial 28, synthetic NO, window 0x800001,
            root 0x2d5, subw 0x800002, time 2756158, (37,35), root:(161,286),
            state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
            XLookupString gives 1 bytes: (1b) ""
            XFilterEvent returns: False

        KeymapNotify event, serial 28, synthetic NO, window 0x0,
            keys:  4294967253 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   


All is working until now;  I switch back to english and type `<Alt>/'
again as the first time:

        $ setxkbmap us
        $ xev -event keyboard 2>&1 | tee xev.us.broken
        Outer window is 0x800001, inner window is 0x800002

        KeymapNotify event, serial 18, 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   

        KeymapNotify event, serial 18, 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   

        KeyPress event, serial 25, synthetic NO, window 0x800001,
            root 0x2d5, subw 0x800002, time 3420216, (49,32), root:(467,286),
            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 28, synthetic NO, window 0x800001,
            root 0x2d5, subw 0x800002, time 3420848, (49,32), root:(467,286),
            state 0x8, keycode 61 (keysym 0x2f, slash), same_screen YES,
            XLookupString gives 1 bytes: (2f) "/"
            XmbLookupString gives 1 bytes: (2f) "/"
            XFilterEvent returns: False

        KeyRelease event, serial 28, synthetic NO, window 0x800001,
            root 0x2d5, subw 0x800002, time 3420953, (49,32), root:(467,286),
            state 0x8, keycode 61 (keysym 0x2f, slash), same_screen YES,
            XLookupString gives 1 bytes: (2f) "/"
            XFilterEvent returns: False

        KeyRelease event, serial 28, synthetic NO, window 0x800001,
            root 0x2d5, subw 0x800002, time 3421481, (49,32), root:(467,286),
            state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
            XLookupString gives 0 bytes: 
            XFilterEvent returns: False

        KeyPress event, serial 28, synthetic NO, window 0x800001,
            root 0x2d5, subw 0x800002, time 3424198, (49,32), root:(467,286),
            state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
            XLookupString gives 1 bytes: (1b) ""
            XmbLookupString gives 1 bytes: (1b) ""
            XFilterEvent returns: False

        KeyRelease event, serial 28, synthetic NO, window 0x800001,
            root 0x2d5, subw 0x800002, time 3424372, (49,32), root:(467,286),
            state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
            XLookupString gives 1 bytes: (1b) ""
            XFilterEvent returns: False

        KeymapNotify event, serial 28, synthetic NO, window 0x0,
            keys:  4294967253 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   

Note that I still pressed escape for consistency even though cwm's
window menu did not even appear.

Reexecuting cwm through "CM-w cwm", i.e. `<Ctrl><Alt>cwm<Enter>' works
in itself and fixes the keymap.

Here's the same xev dance afterwards, no fiddling with setxkbmap or so:

        $ xev -event keyboard 2>&1 | tee xev.us.fixed
        Outer window is 0x800001, inner window is 0x800002

        KeymapNotify event, serial 18, 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   

        KeymapNotify event, serial 18, 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   

        KeyPress event, serial 25, synthetic NO, window 0x800001,
            root 0x2d5, subw 0x800002, time 3703428, (35,43), root:(499,301),
            state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
            XLookupString gives 0 bytes: 
            XmbLookupString gives 0 bytes: 
            XFilterEvent returns: False

        KeymapNotify event, serial 26, synthetic NO, window 0x0,
            keys:  4294967253 2   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   

        KeymapNotify event, serial 26, synthetic NO, window 0x0,
            keys:  4294967253 2   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   

        KeyRelease event, serial 28, synthetic NO, window 0x800001,
            root 0x2d5, subw 0x800002, time 3706111, (35,43), root:(499,301),
            state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
            XLookupString gives 1 bytes: (1b) ""
            XFilterEvent returns: False

        KeymapNotify event, serial 28, synthetic NO, window 0x0,
            keys:  4294967253 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   

Reply via email to