From: Philipp Stephani <p.stephani2@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 19977@debbugs.gnu.org
Subject: bug#19977: 24.4; Incorrect translation of Super modifier with Ctrl or Meta on OS X
Date: Tue, 29 Mar 2016 16:38:52 +0000 [thread overview]
Message-ID: <CAArVCkS49xkwhy-w-36eWbgP5W4iRUifkkEXgH6vT-YfmCz0XQ@mail.gmail.com> (raw)
In-Reply-To: <CAArVCkRLe=5Lms-h9=ZAU8CTcp8WHpr4D=6ENXnE3k7xJTqayQ@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1099 bytes --]
Philipp Stephani <p.stephani2@gmail.com> schrieb am Di., 29. März 2016 um
18:31 Uhr:
> Eli Zaretskii <eliz@gnu.org> schrieb am Di., 29. März 2016 um 18:00 Uhr:
>
>> > From: Philipp Stephani <p.stephani2@gmail.com>
>> > Date: Tue, 29 Mar 2016 15:45:13 +0000
>> > Cc: 19977@debbugs.gnu.org
>> >
>> > Some more debugging output, using NS_KEYLOG = 1. The input sequence is
>> a, C-a, M-a, s-a, C-S-a, M-S-a,
>> > s-S-a, C-s-a, M-s-a. As you can see, 'code' is correct (A or a), except
>> for the last two cases.
>>
>> I guess someone who understand how keyboard input works on OS X will
>> have to look into this.
>>
>
> If I comment out the if block below the comment
> /* if super (default), take input manager's word so things like
> dvorak / qwerty layout work */
> in nsterm.m, everything works. Unless somebody can explain why that if
> block exists at all (i.e. why [theEvent characters] instead of [theEvent
> charactersIgnoringModifiers] is used), then I'd suggest to remove the block
> completely.
>
Attached a patch to remove this code.
[-- Attachment #1.2: Type: text/html, Size: 1860 bytes --]
[-- Attachment #2: 0001-Fix-bug-19977.patch --]
[-- Type: application/octet-stream, Size: 2480 bytes --]
From a43dc5205c47aa9a4dd4378240ef2ecd49a3904a Mon Sep 17 00:00:00 2001
From: Philipp Stephani <phst@google.com>
Date: Tue, 29 Mar 2016 18:37:40 +0200
Subject: [PATCH] Fix bug#19977
* nsterm.m (keyDown:): Remove special-casing of Command key to fix
bug#19977.
---
src/nsterm.m | 37 ++-----------------------------------
1 file changed, 2 insertions(+), 35 deletions(-)
diff --git a/src/nsterm.m b/src/nsterm.m
index 4048ac4..dd51e99 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -5873,41 +5873,8 @@ not_in_argv (NSString *arg)
: ns_right_command_modifier);
if (is_left_key)
- {
- emacs_event->modifiers |= parse_solitary_modifier
- (ns_command_modifier);
-
- /* if super (default), take input manager's word so things like
- dvorak / qwerty layout work */
- if (EQ (ns_command_modifier, Qsuper)
- && !fnKeysym
- && [[theEvent characters] length] != 0)
- {
- /* XXX: the code we get will be unshifted, so if we have
- a shift modifier, must convert ourselves */
- if (!(flags & NSShiftKeyMask))
- code = [[theEvent characters] characterAtIndex: 0];
-#if 0
- /* this is ugly and also requires linking w/Carbon framework
- (for LMGetKbdType) so for now leave this rare (?) case
- undealt with.. in future look into CGEvent methods */
- else
- {
- long smv = GetScriptManagerVariable (smKeyScript);
- Handle uchrHandle = GetResource
- ('uchr', GetScriptVariable (smv, smScriptKeys));
- UInt32 dummy = 0;
- UCKeyTranslate ((UCKeyboardLayout*)*uchrHandle,
- [[theEvent characters] characterAtIndex: 0],
- kUCKeyActionDisplay,
- (flags & ~NSCommandKeyMask) >> 8,
- LMGetKbdType (), kUCKeyTranslateNoDeadKeysMask,
- &dummy, 1, &dummy, &code);
- code &= 0xFF;
- }
-#endif
- }
- }
+ emacs_event->modifiers |= parse_solitary_modifier
+ (ns_command_modifier);
is_right_key = (flags & NSRightControlKeyMask) == NSRightControlKeyMask;
is_left_key = (flags & NSLeftControlKeyMask) == NSLeftControlKeyMask
--
2.7.4
next prev parent reply other threads:[~2016-03-29 16:38 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-01 16:36 bug#19977: 24.4; Incorrect translation of Super modifier with Ctrl or Meta on OS X Philipp Stephani
2016-03-29 10:17 ` Philipp Stephani
2016-03-29 15:10 ` Eli Zaretskii
2016-03-29 15:29 ` Philipp Stephani
2016-03-29 15:45 ` Philipp Stephani
2016-03-29 15:59 ` Eli Zaretskii
2016-03-29 16:31 ` Philipp Stephani
2016-03-29 16:38 ` Philipp Stephani [this message]
2016-03-29 16:57 ` Eli Zaretskii
2016-03-29 17:19 ` Adrian Robert
2016-03-29 17:44 ` Philipp Stephani
2016-03-29 17:56 ` Adrian Robert
2016-03-29 19:43 ` Philipp Stephani
2016-03-29 20:07 ` Philipp Stephani
2016-03-30 2:39 ` Eli Zaretskii
2016-03-30 17:35 ` Philipp Stephani
2017-12-26 17:42 ` Alan Third
2017-12-26 20:14 ` Philipp Stephani
2017-12-26 21:16 ` Alan Third
2018-02-04 19:07 ` Philipp Stephani
2018-02-04 20:18 ` Alan Third
2018-02-05 8:02 ` Philipp Stephani
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=CAArVCkS49xkwhy-w-36eWbgP5W4iRUifkkEXgH6vT-YfmCz0XQ@mail.gmail.com \
--to=p.stephani2@gmail.com \
--cc=19977@debbugs.gnu.org \
--cc=eliz@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.