Re: ctwm "forgets" keybindings after a while

Rhialto <[email protected]> Mon, 11 Oct 2021 11:40:19 +0200
Newsgroups gmane.comp.window-managers.ctwm
Message-ID <[email protected]>
On Sun 10 Oct 2021 at 15:52:04 -0700, Jonathan Thornburg wrote:
> Brilliant!  You are indeed both correct -- my problem was mainly Num-Lock
> (which on my keyboard is needed in order to enable the numeric keypad),
> but when I tested, Caps-Lock also causes my bindigs to be ignored.

One shortcoming with the solution is that it doesn't work for the case
when you have *both* of these modifiers active.

This stems from the somewhat annoying fact that to make key mappings
work, they have to be "grabbed" from the X server, including all
modifiers that apply to them correctly set. So if you have a key mapping
for plain 'X' and you ignore CapsLock and NumLock, ctwm needs to grab
'X', CapsLock+'X', NumLock+'X', and CapsLock+NumLock+'X'. If you were to
ignore 3 modifiers, it would need to grab 8 different keys. Of course
this gets out of hand very very quickly.

And the person who wrote the IgnoreModifier code didn't think of this
anyway, since it only grabs the keys with 1 modifier at a time...

I don't know if there is a better solution than what I sketeched above.
Because I dislike it so much, I haven't made such a change. I'm not sure
if there is a better solution though...

-Olaf.
-- 
___ "Buying carbon credits is a bit like a serial killer paying someone else to
\X/  have kids to make his activity cost neutral." -The BOFH    falu.nl@rhialto
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEFVAhiiWjqgwBVdQAmYnGRWHD+9MFAmFkBn4ACgkQmYnGRWHD
+9OigQf/R58wvndFI3j+p+KVpslU+OBal35N3Jso9f+56lKQUHCxYDg+GZ7v5ydA
AUhOvvBkq2bv4kum3qjpSJ4DmSoUNw+jaHrHBUk6aJGdpQovpvu8ZJuRuqAkZv3z
3it7MacN2OgbgrigyLOl/isW/viUxuvIF9gObH7U3D813/2vmLYPcsBjbFA2e07X
U6ZuOQukkMfduYytruaLaSETbvI5dtLeCkYGMOB2GLfxMaaj+inji/4gJkEvlvgL
rwmXvwD5ISBCOitxgPJpHpJpuigvWW359pCvl4tfhiYyG/+LNpWvnc6o4pz41kUY
rfflnYmkgvyOhZ5NTdFPoLR1IytK0w==
=EJh6
-----END PGP SIGNATURE-----