[wmii] dmenu patches and os x issue

From: Alexis Hildebrandt <afh_AT_2drop.net>
Date: Wed, 10 Jan 2007 17:21:19 +0100

Hello,
please find attached 2 small patches for dmenu that

1. reduce the LOC by 2 lines
2. allow CTRL-[ as an alias for ESC

I ran into a problem when using the latest dmenu on Apple's X11 that
comes with OS X.

For some reason the XKeyEvent produced by ALT+g with an Us or Us
Extended keyboard map matches the Mod1Mask but the KeySym that is
returned by XLookupString does not match XK_g, but rather XK_copyright
for Us and Us Extended.
This does also happen with the other keys, namely XK_h, XK_l, XK_j,...
Some of the values of the generated KeySym are not even defined in
X11/keysumdef.h.

The following table you will find the keysym definitions from
X11/keysymdef.h and the numerical value as I've seen them with
the Us and Us Extended keyboard. Hope it helps...

wmiiwm | Us | Us Extended
========+========================+=============================
XK_h | XK_abovedot (0x1ff) | - (0x10002cd)
XK_l | - (0xac) | XK_minus
XK_j | - (0x1002206) | XK_dead_abovering (0xfe58)
XK_k | - (0x10002da) | XK_dead_doubleacute (0xfe59)
XK_g | XK_copyright (0xa9) | XK_copyright (0xa9)
XK_G | XK_doubleacute (0x1bd) | - (0xafc)

Has anyone experienced similar behaviour with dmenu on OS X?

I've patched kpress() in main.c of dmenu to match the other cases, but
there must a better solution than this that should involve configuration
of the X11 keyboard map.
Any ideas?

Greetz Alexis.

-- 
"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe trying
to produce bigger and better idiots. So far, the Universe is winning."
        -- Rich Cook


Received on Wed Jan 10 2007 - 17:21:50 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:17:54 UTC