Re: [dev] [dwm] can't toggle tags with mouse

From: Andreas Amann <amann_AT_physik.tu-berlin.de>
Date: Wed, 26 May 2010 11:44:04 +0200

On Wed, May 26, 2010 at 01:08:27AM +0200, orschiro_AT_googlemail.com wrote:
> Sorry forgot to add a small request when we're already talking about this issue.
>
> Is there any way to display the currently used layout via xsetroot in statusbar?
>

I simply use something like
setxkbmap -option "grp:alt_shift_toggle,grp_led:caps" "ie,de"
which uses the otherwise unused caps lock led for this.

Btw, I noticed that if you specify more than two keyboards, bits 13 and 14
in XEvent->xbutton->state seem to indicate which layout is currently
selected. This seems to be consistent with the following macro defined in
/usr/include/X11/extensions/XKB.h :
#define XkbGroupForCoreState(s) (((s)>>13)&0x3)

Rather than including XKB.h and dealing with its macros, the better solution
might be to simply list the allowed modifiers in the CLEANMASK macro as in the
attached patch. This works for any number of keyboard layout and masks out
any other modifiers by default. Arguably the definition of CLEANMASK could
even move to config.def.h for easy tweakability by users.

Andreas

Received on Wed May 26 2010 - 09:44:04 UTC

This archive was generated by hypermail 2.2.0 : Wed May 26 2010 - 09:48:01 UTC