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
This archive was generated by hypermail 2.2.0 : Wed May 26 2010 - 09:48:01 UTC