From: Yong-Gang Wang <wixette@gmail.com>
To: 11041@debbugs.gnu.org
Subject: bug#11041: 23.4; Shifted keystrokes are not passed into OS X Input Manager correctly
Date: Sun, 18 Mar 2012 12:23:23 +0800 [thread overview]
Message-ID: <CAHytE+UB4P2HSPsLvceO=DXsq5Vt+K5w_CJhi4TL3UsFgtM8KQ@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1480 bytes --]
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 王咏刚
[-- Attachment #2: Type: text/html, Size: 2097 bytes --]
next reply other threads:[~2012-03-18 4:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <m2mv0h3j8n.fsf@breton.holly.idiocy.org>
2012-03-18 4:23 ` Yong-Gang Wang [this message]
2017-12-27 0:11 ` bug#11041: 23.4; Shifted keystrokes are not passed into OS X Input Manager correctly Alan Third
[not found] ` <handler.11041.C.1518214370904.notifdonectrl.0@debbugs.gnu.org>
2018-02-11 2:45 ` bug#11041: acknowledged by developer (control message for bug #11041) Yong-Gang Wang
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='CAHytE+UB4P2HSPsLvceO=DXsq5Vt+K5w_CJhi4TL3UsFgtM8KQ@mail.gmail.com' \
--to=wixette@gmail.com \
--cc=11041@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.