Re: [dwm] dwm stealing input

From: Stephen Caraher <moskvax_AT_gmail.com>
Date: Wed, 25 Oct 2006 23:42:12 +0930

On 11:03, Wed 25 Oct 06, Anselm R. Garbe wrote:
> On Wed, Oct 25, 2006 at 06:24:13PM +0930, Stephen Caraher wrote:
> > After I start dwm or wmii, I have a problem where the window manager appears not
> > to pass input on to clients. For example, I can start urxvt with my modkey+enter
> > bind, or any other program with modkey+p which launches dmenu, which gets my
> > input fine. I can then switch focus between these programs and close them, but
> > none of them ever recieve any of my input. Urxvt's cursor flashes whenever I
> > press a key, but nothing appears in its window. Xterm acts as if I'm not
> > pressing anything, as does firefox.
> >
> > This problem only affects dwm/wmii, not other WM's. It's happened on and off
> > over the past few months, it used to happen sometimes after I first started
> > using wmii. Today it's come back after I accidentally trashed my .Xmodmap and
> > .Xdefaults.
> >
> > Thanks in advance for any solutions or suggestions about how to further proceed
> > here.
>
> Hmm, that is odd. I suspect there might be a problem with your
> MODKEY-mapping, maybe that is trashed. Check if you can use
> different modifier keys as well e.g. instead of Mod1-Return press WinKey-Return...
>
> If that launches a terminal as well there is something broken.
>
> Despite of that, check if toggling NumLock or ScrollLock has any
> different effects.
>
> After all, dwm/wmii should have no effect on all keys which
> aren't passively grabbed in combination with a modifier key
> (MODKEY). Check if you can type w for example.

I launched xev through dmenu to look for clues as to what's going on. Every time
I press a key, I get this sequence of events:

        FocusIn event, serial 23, synthetic NO, window 0x600001, mode NotifyUngrab,
        detail NotifyAncestor

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

        FocusOut event, serial 23, synthetic NO, window 0x600001,
                 mode NotifyGrab, detail NotifyAncestor

        FocusOut event, serial 23, synthetic NO, window 0x600001,
                 mode NotifyUngrab, detail NotifyPointer

So "key number two" is apparently being held down, although I'm not touching
anything on the keyboard. I'm running openbox right now, and when I move in and
out of xev without touching the keyboard, the KeymapNotify looks like this
instead:

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

My MODKEY is the same as it's always been in my config.h, it's just "#define
MODKEY = Mod1Mask", and my .Xmodmap doesn't touch the mod keys. What my .Xmodmap
does do though, that might be relevant, is it swaps the Escape and Caps Lock
keys, like this:

        remove Lock = Caps_Lock
        keysym Escape = Caps_Lock
        keysym Caps_Lock = Escape
        add Lock = Caps_Lock

As for the pressing w or trying WinKey instead of Mod1 or changing num/scroll
lock, none of it has any effect.

-- 
Stephen Caraher (moskvax) // GPG: C7C4C591

Received on Wed Oct 25 2006 - 16:12:46 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:32:09 UTC