From: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
To: 68927@debbugs.gnu.org
Subject: bug#68927: CapsLock gets toggled by a frozen Emacs even if that's supposed to be prevented by a third party app
Date: Sun, 4 Feb 2024 22:11:55 +0300 [thread overview]
Message-ID: <b4d46e52-f00e-4cf2-b09d-8d9929437b77@gmail.com> (raw)
I've originally mentioned this in discussion on #68914, because it
seemed like a somewhat similar problem. But Eli suggested there that I
should report this separately.
Let me disclaim in advance that I believe that this is an extremely
minor niche issue and the value of investigating it is only in making
sure that there aren't any other, more important use cases hit by this.
So here are the detailed reproduction steps:
1. Use Windows. I haven't really tested other platforms for this, but I
highly suspect that this is a platform-specific issue.
2. Setup Mahou layout switcher. You can download it here:
https://gitea.com/BladeMight/Mahou/releases/download/latest-commit/Release_x86_x64.zip
The default settings should be sufficient. But to make sure, here are
the relevant ones:
-On the "Layouts" tab, make sure "Change to specific layout by keys" is
set to on and Caps Lock is the first key.
-On the "Functions" tab make sure "Remap Caps Lock to F18" is set to on.
3. Run Emacs -q
4. Eval (global-set-key [f18] nil) . We're doing this to avoid extra
paste due to Mahou F18 setting. But strictly it's not necessary.
5. Freeze Emacs by forcing it to run some code for a few seconds. I've used:
(let ((x 0))
(dotimes (i 10000000)
(setq x (1+ x))))
6. While the above is running, start tapping CapsLock. You'd see that
CapsLock toggles even though it shouldn't and this only happens when
Emacs is frozen.
Few other notes regarding this bug:
Mahou is somewhat buggy too, I've seen it pointlessly toggle caps in
other apps, but it does not seem to be the same issue.
I originally noticed it while using a certain proprietary app for the
same purpose. So there are at least 2 applications with which this
reliably happens.
There are many more applications with which this is not reproducible. I
could not reproduce it with AutoHotkey, a dozen of other apps, including
some other layout switchers like dotSwitcher.
So it seems like the third party app should be intercepting CapsLock in
a very particular way for this to show up and thus the importance of the
Mahou F18 setting is particularly interesting, because without it, the
bug is not reproducible with Mahou.
I was wrong about Emacs 25 not suffering from this problem. I could
reproduce it there too.
next reply other threads:[~2024-02-04 19:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-04 19:11 Nikolay Kudryavtsev [this message]
2024-02-05 12:10 ` bug#68927: CapsLock gets toggled by a frozen Emacs even if that's supposed to be prevented by a third party app Eli Zaretskii
2024-02-05 12:45 ` Nikolay Kudryavtsev
2024-02-05 13:00 ` Eli Zaretskii
2024-02-05 13:13 ` Nikolay Kudryavtsev
2024-02-05 14:29 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b4d46e52-f00e-4cf2-b09d-8d9929437b77@gmail.com \
--to=nikolay.kudryavtsev@gmail.com \
--cc=68927@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.