Discussion:
xxkb, per window keyboard layout
Stanimir Dragiev
2008-08-10 17:47:31 UTC
Permalink
Hello to all on the list.

I used to be a wmii user for nearly 2 years on one computer of mine. For
about the same time I used dwm under Solaris on other computer (cos I
haven't manage to get wmii compiled there :o| , I considered dwm kind of
fallback). Until about 2 months ago, when I've got some, in my opinion,
transcendent :o) behaviour in wmii which I haven't found motivation to
investigate the cause for. This was the occasion to think about converting
to dwm at home too. I realized
- I don't use many features of wmii
- run-time reconfigurability is a nice to have, but not a real limitation
when
- the Xsession does not hang on the WM and
- the tag rules are reasonable
- make && make install && dwm does not take too long
- dwm has significantly better response time when the machine is slow
- ...

So I've done the single logical thing: I now use dwm everywhere I have
impact on the WM choice.

All I want to say: I am nearly perfectly happy with dwm! Thanks a lot to
all contributors!

The *only* problem is: A big deal of the things I type is Cyrillic, so I
need to use at least 2 keyboard layouts. Usually, the windows in which I
type Cyrillic and the ones I type Latin, are different. Xxkb is exactly
about this: remembering the keyboard layout for each window. This means for
example:
- default keyboard layout is DEF (alternative is ALT)
- start terminal A
- start terminal B
- focus window A
- layout in window A is DEF
- change layout to ALT
- layout in window A is ALT
- focus window B
- layout in window B is DEF
- focus window A
- layout in window A is ALT (preserved after focus switch)

Unfortunately, this does not work in dwm. This problem was reported once,
here:

http://article.gmane.org/gmane.comp.window-managers.dwm/826 ,

but I didn't found any follow-ups. I found the same problem reported for
xmonad (which I also tried out and verified) here:

http://www.haskell.org/pipermail/xmonad/2008-April/005439.html .

There, some more background is given on the subject (like xxkb relying on
XReparentWindow ...). The issue appears to be closed for xmonad being xxkb
issue.

My questions:

- Is there a way to workaround this?
- Is there a quick "fix", better said hack, in dwm to allow xxkb work as
expected? A hint where I should look in the code?
- Does anybody know alternative tool or setting to do the job in
dwm-compliant manner ?

Thank you in advance for your suggestions and hints!
--
cheers
stanio_
Alexander Polakov
2008-08-10 18:52:06 UTC
Permalink
xneur worked fine for me in the past, should work at the moment too.
stanio-CFLBMwTPW48UNGrzBIF7/
2008-08-10 20:17:34 UTC
Permalink
Hello,
Post by Alexander Polakov
xneur worked fine for me in the past, should work at the moment too.
Has many features that I don't need but has the one I need :o)
It works.
Thanx a lot!
--
cheers
stanio_
Anselm R Garbe
2008-08-15 08:49:20 UTC
Permalink
Hi,
Post by Stanimir Dragiev
The *only* problem is: A big deal of the things I type is Cyrillic, so I
need to use at least 2 keyboard layouts. Usually, the windows in which I
type Cyrillic and the ones I type Latin, are different. Xxkb is exactly
about this: remembering the keyboard layout for each window. This means for
- default keyboard layout is DEF (alternative is ALT)
- start terminal A
- start terminal B
- focus window A
- layout in window A is DEF
- change layout to ALT
- layout in window A is ALT
- focus window B
- layout in window B is DEF
- focus window A
- layout in window A is ALT (preserved after focus switch)
Unfortunately, this does not work in dwm. This problem was reported once,
http://article.gmane.org/gmane.comp.window-managers.dwm/826 ,
but I didn't found any follow-ups. I found the same problem reported for
http://www.haskell.org/pipermail/xmonad/2008-April/005439.html .
There, some more background is given on the subject (like xxkb relying on
XReparentWindow ...). The issue appears to be closed for xmonad being xxkb
issue.
If xxkb depends on XReparentWindow it might set some window properties
on the parent window which are used to remember the kb settings. So
this should be an easy fix in xxkb.

Kind regards,
--Anselm

Loading...