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

Attachment: signature.asc
Description: PGP signature

Reply via email to