GNU bug report logs -
#72555
30.0.60; [PATCH] NS: support passing key events to the system
Previous Next
Reported by: Kai Ma <justksqsf <at> gmail.com>
Date: Sat, 10 Aug 2024 11:49:02 UTC
Severity: normal
Found in version 30.0.60
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#72555: 30.0.60; [PATCH] NS: support passing key events to the system
which was filed against the emacs package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 72555 <at> debbugs.gnu.org.
--
72555: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72555
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Kai Ma <justksqsf <at> gmail.com> writes:
> Sorry, I don’t have the capacity to work on this for the next months. Please close it. I’ll resubmit a patch if I ever sort this out in the future.
>
> According to my memories, the remaining problems are:
>
> 1. C-/ causes an unconditional beep because macOS has no default keybinding for it.
> 2. C-q is intercepted by Cocoa’s own quoted insert.
>
> We can simply handle them inside Emacs, but I’m not sure whether the list is complete.
OK, I'm therefore closing this bug report for now.
Please report back if you make any further progress with this.
Thanks in advance.
[Message part 3 (message/rfc822, inline)]
[Message part 4 (text/plain, inline)]
The attached patch adds ns-pass-keys-to-system and makes Emacs to send
the key events to the system input manager when it's set. This can
correct a number of problems that are hard to work around due to the
current key handling logic of Emacs NSport.
(1) The keydown event of Shift+Enter is never sent to the system input
method. This causes an annoying problem for system input methods: if
you press Shift+Enter in Emacs (that is three events: Shift down,
Shift+Enter down, Shift up), the input method only sees Shift down and
up. However, many input methods interprets a click of Shift differently
(mostly toggling ASCII mode), and this causes unwanted behavior. (This
was reported as #38293 in 2019.)
This can only be fixed by Emacs, because to input methods, Shift+Enter
is indistinguishable from a single Shift.
(2) The input method may define some special keys and Emacs cannot make
use of them.
(3) Some system level shortcuts never work in Emacs. For example,
Rectangle (think of it as a third-party window manager in macOS) will
not receive any requests from Emacs windows.
The fix is mostly modeled after Mitsuharu's Mac port, with a few
adjustments for NS port. I've been using it for some time and there are
no more defects known to me, so I decide it's time to send it to you.
Regards,
Kai
[0001-NS-Pass-key-events-to-system-first.patch (application/octet-stream, attachment)]
This bug report was last modified 85 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.