GNU bug report logs - #11041
23.4; Shifted keystrokes are not passed into OS X Input Manager correctly

Previous Next

Package: emacs;

Reported by: Yong-Gang Wang <wixette <at> gmail.com>

Date: Sun, 18 Mar 2012 19:40:02 UTC

Severity: normal

Tags: fixed

Found in version 23.4

Fixed in version 26.0

Done: Alan Third <alan <at> idiocy.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11041 in the body.
You can then email your comments to 11041 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#11041; Package emacs. (Sun, 18 Mar 2012 19:40:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Yong-Gang Wang <wixette <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 18 Mar 2012 19:40:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Yong-Gang Wang <wixette <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.4;
	Shifted keystrokes are not passed into OS X Input Manager correctly
Date: Sun, 18 Mar 2012 12:23:23 +0800
[Message part 1 (text/plain, inline)]
In GNU Emacs 23.4.1 (x86_64-apple-darwin, NS apple-appkit-1038.36)
 of 2012-01-29 on bob.porkrind.org

Repro: On Mac OS X, turns a CJK input method on, e.g. Chinese Pinyin Input
Method, then types shifted characters like ":", "?", "<" or ">" in GNU
Emacs OS X 23.4.1.
Expected results: Chinese fullwidth punctuations are input, like ":", "?",
"《" or "》".
Actual results: English halfwidth punctuations are input, ":", "?", "<" or
">".

Debug and Code location:

See src/nsterm.m line 4490-4492, the current logic is, when there are
modifier keys, including SHIFT, being pressed down, the key code won't be
sent to OS X Input Manager for composing the input method result. This
logic is NOT true for shifted keystrokes. Actually, shifted keystrokes
like ":", "?", "<" or ">" are still display characters and should be sent
into the Input Manager for composing.

      /* if it was a function key or had modifiers, pass it directly to
emacs */
      if (fnKeysym || (emacs_event->modifiers
                       && [[theEvent charactersIgnoringModifiers] length] >
0))

A workable fix:

      /* if it was a function key or had modifiers(except for shift only
modifier), pass it directly to emacs */
      if (fnKeysym || (emacs_event->modifiers
                       && emacs_event->modifiers != shift_modifier
                       && [[theEvent charactersIgnoringModifiers] length] >
0))

Thanks,


-- 
Yong-Gang Wang 王咏刚
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11041; Package emacs. (Wed, 27 Dec 2017 00:12:02 GMT) Full text and rfc822 format available.

Message #8 received at 11041 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Yong-Gang Wang <wixette <at> gmail.com>
Cc: 11041 <at> debbugs.gnu.org
Subject: Re: bug#11041: 23.4;
 Shifted keystrokes are not passed into OS X Input Manager correctly
Date: Wed, 27 Dec 2017 00:11:13 +0000
Yong-Gang Wang <wixette <at> gmail.com> writes:

> Repro: On Mac OS X, turns a CJK input method on, e.g. Chinese Pinyin Input Method, then types shifted characters like ":", "?", "<" or ">" in GNU Emacs OS X 23.4.1.
> Expected results: Chinese fullwidth punctuations are input, like ":", "?", "《" or "》".
> Actual results: English halfwidth punctuations are input, ":", "?", "<" or ">".
>
> Debug and Code location:
>
> See src/nsterm.m line 4490-4492, the current logic is, when there are modifier keys, including SHIFT, being pressed down, the key code won't be sent to OS X Input Manager for composing the input method result. This logic is NOT true for shifted keystrokes. Actually, shifted keystrokes like ":", "?", "<" or ">" are still display characters and should be sent into the Input Manager
> for composing.
>
>       /* if it was a function key or had modifiers, pass it directly to emacs */
>       if (fnKeysym || (emacs_event->modifiers
>                        && [[theEvent charactersIgnoringModifiers] length] > 0))
>
> A workable fix:
>
>       /* if it was a function key or had modifiers(except for shift only modifier), pass it directly to emacs */
>       if (fnKeysym || (emacs_event->modifiers
>                        && emacs_event->modifiers != shift_modifier
>                        && [[theEvent charactersIgnoringModifiers] length] > 0))

Hi Sorry, it's taken so long for someone to get back to you.

It looks like this exact fix was already in Emacs when the bug was
raised, so I'm not sure what's going on.

Are you able to confirm whether this now works as expected?
-- 
Alan Third




Added tag(s) fixed. Request was from Alan Third <alan <at> idiocy.org> to control <at> debbugs.gnu.org. (Wed, 27 Dec 2017 00:12:04 GMT) Full text and rfc822 format available.

bug marked as fixed in version 26.0, send any further explanations to 11041 <at> debbugs.gnu.org and Yong-Gang Wang <wixette <at> gmail.com> Request was from Alan Third <alan <at> idiocy.org> to control <at> debbugs.gnu.org. (Fri, 09 Feb 2018 22:13:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11041; Package emacs. (Sun, 11 Feb 2018 02:46:02 GMT) Full text and rfc822 format available.

Message #15 received at 11041 <at> debbugs.gnu.org (full text, mbox):

From: Yong-Gang Wang <wixette <at> gmail.com>
To: 11041 <at> debbugs.gnu.org
Subject: Re: bug#11041 acknowledged by developer (control message for bug
 #11041)
Date: Sun, 11 Feb 2018 10:45:07 +0800
[Message part 1 (text/plain, inline)]
Confirmed that the bug has been fixed. Thanks,

On Sat, Feb 10, 2018 at 6:13 AM, GNU bug Tracking System <
help-debbugs <at> gnu.org> wrote:

> This is an automatic notification regarding your bug report
> #11041: 23.4; Shifted keystrokes are not passed into OS X Input Manager
> correctly,
> which was filed against the emacs package.
>
> Thank you for your report, which has now been closed.
> You can view the full report at
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11041
>
> If you require further information, please followup to
> 11041 <at> debbugs.gnu.org.
>
> debbugs.gnu.org maintainers
> (administrator, GNU bugs database)
>
>


-- 
Yong-Gang Wang 王咏刚
[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 11 Mar 2018 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 180 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.