homebrew-emacs-plus
homebrew-emacs-plus copied to clipboard
`--with-xwidgets` changes behavior of ESC in GUI
I'm not heartbroken about this since, for my browser needs, the feature just isn't there yet, but I was surprised that evil escape just stopped working in the GUI. I was still able to use ESC in the terminal, ^[
in the GUI would work right, but maybe something about dipping into X made emacs go "oh, it's Linux" and stop seeing ESC? FWIW, karabiner event viewer shows HID code 41 for both my ctrl-press -> esc remap and for the "real" esc key.
Curious issue. And I still don't know the answer. Maybe there are other xwidgets users who can help? @agzam as far as I remember you were the most active user of this feature 😸 Do you have this issue?
I did notice - ESC key sometimes does strange things, and I'm not sure if that's core, xwidgets, Spacemacs, or my local config issue. Like for example:
- when the frame is undecorated (borderless) ESC may stop working altogether. I have to switch to windowed-frame and back to undecorated to fix that
- for some reason when I'm in full-screen mode with
(setq ns-use-native-fullscreen t)
, pressing ESC switches back to non-fullscreen. That doesn't bother me, since I don't use native-fullscreen.
Also having this issue which makes it unusable unfortunately (emacs 28 plus native comp + xwidgets, on M1 Monterey, Doom emacs) as esc stops working intermittently. Is this related to installing with xwidgets?
xwidget has this bug (I'm not sure, this might be it https://github.com/veshboo/emacs/issues/4). The only workaround I have found, and it looks like works for me - you need to click somewhere within the frame manually, using the mouse (I know, I hate that too). All my attempts to resolve this with elisp: focusing programmatically, selecting objects, emulating mouse-clicks, using timers - they all were unsuccessful.
@agzam thanks for the link. Looks like there is proposed solution, it's just no one brought it here.
I've no ability to test it myself, so the best course of action would be if someone tests this patch. I can guide you on this 😸 So if anyone wants to contribute this possible fix to Emacs+, just ping me and I will help with that. Maybe @matteha @agzam or @winmillwill ?
I also have this annoying behavior when the Escape key is inaccessible after interacting with a xwidget.
you need to click somewhere within the frame manually, using the mouse (I know, I hate that too)
For me, this is also the only workaround to fix this which isn't too nice.
So I just tested the patch in https://github.com/veshboo/emacs/issues/4 on emacs-plus@30
on macOS 14.0 - and it works flawlessly. The Escape key behavior is not modified anymore.
I'd love to see this merged here, but maybe someone else can test this as well? 🙂
and it works flawlessly
The patch only works for the "escape" key, but I've noticed that the arrow keys are also stuck on interacting with an XWidget. And they can only be fixed when you click inside the Emacs window manually.
The linked patch does not help with that.