Re: ctwm "forgets" keybindings after a while

Rhialto <[email protected]> Sat, 9 Oct 2021 14:48:10 +0200
Newsgroups gmane.comp.window-managers.ctwm
Message-ID <YWGPinbBu/+z/[email protected]>
On Fri 08 Oct 2021 at 23:18:00 -0700, Jonathan Thornburg wrote:
> 
> I'm using ctwm 4.0.3
> > (bzr:[email protected])
> on OpenBSD 7.0 (2021-Sep-27 snapshot).  My .ctwmrc contains the lines
> 
> "F1"    =      : window : f.raise
> "F1"    =      : title  : f.raise
> 
> "F12"   =      : window : f.lower
> "F12"   =      : title  : f.lower
> 
> When I start ctwm, these work fine -- the F1 key raises the current
> window to the front, and the F12 lowers the current window to the back.
> 
> The problem is, after running ctwm for a while (anywhere from a few
> minutes to some hours, depending on my usage), these keys stop working
> (they no longer raise/lower the current window).  I've checked with
> 'xev' and these keys are still generating keypress X events.

The most common thing that causes such a symptom is having Caps Lock
pressed. It counts as a modifier, so pressing CapsLock + F1 doesn't
match your mapping.

> Is this a known issue with ctwm?  If not, are there debug features
> I could activate to help in tracking down the problem?

If that is not it, there is a #define DEBUG_EVENTS that you could
enable in event_handlers.c, and recompile ctwm. Unfortunately it doesn't
add any output for key presses... but you could add some printf
statements inside the function HandleKeyPress() to check how far it
gets. If you restart the modified ctwm (ctwm --replace) from a text
console, it can freely print its stuff, unhindered by X.

-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+9MFAmFhj4YACgkQmYnGRWHD
+9MO2AgAn3Vsjaw0HlinjsJpGMpmUb1ypq3MzcB3xFRqRK/8xDPkniMYK+MH6NSS
OJ7va5tJF8I1xH1dnLjdVx17lDPtBQzfcykOFeu+5MDwZOmwFp0lPAnPtSz346Fm
nTNbllocNe/aPnrkJDLAeY02LhS7ZsPyQ7s+wp5xYnAJs2XmUYyHC6zG2Prh9r5e
uXgakl8ky2bC9/BLJNajTcP3s94ahBvKKHD6WURNkObrv59eE5x521jJUdgXBqu0
NOAAXAwLMcDBx49uHxocML6ZTgsZ4uCqRLAiUNW/zvzAtmOyLV5f8CZMFhWjI7Ih
mGxaXbvh3J5MBNsjhZQie8Bdovkayw==
=sEn8
-----END PGP SIGNATURE-----