bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11041: 23.4; Shifted keystrokes are not passed into OS X Input Manag


From: Alan Third
Subject: bug#11041: 23.4; Shifted keystrokes are not passed into OS X Input Manager correctly
Date: Wed, 27 Dec 2017 00:11:13 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (darwin)

Yong-Gang Wang <wixette@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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]