From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 14 11:58:50 2020 Received: (at submit) by debbugs.gnu.org; 14 Nov 2020 16:58:50 +0000 Received: from localhost ([127.0.0.1]:51856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdyt0-0001uP-5C for submit@debbugs.gnu.org; Sat, 14 Nov 2020 11:58:50 -0500 Received: from lists.gnu.org ([209.51.188.17]:58838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdysy-0001uE-BK for submit@debbugs.gnu.org; Sat, 14 Nov 2020 11:58:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49518) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdysw-0006ZJ-Ep for bug-gnu-emacs@gnu.org; Sat, 14 Nov 2020 11:58:48 -0500 Received: from pv50p00im-ztdg10021901.me.com ([17.58.6.55]:39948) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdyss-0002ni-VV for bug-gnu-emacs@gnu.org; Sat, 14 Nov 2020 11:58:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1605373117; bh=AtGqqYXnT6AlLhPJz4a92lXaFvtHJ6yyMC9ANTSKUV8=; h=From:Content-Type:Mime-Version:Subject:Message-Id:Date:To; b=OY6ApfbiEATIxveRfL0R0a0NpaPkv5sXb3j6wBLGfpHNOta1zD9Blx++uCFmTX76K 6HD5XddTNphob0M830C62MDO+8z5T1ITAAE/tUwUcwEXRkmuebzIoD6y/YYfPIdHg5 ehJ2EWMJF6I6Q5xesAv5FgFsbaAQWzC005vvi593tnBlSNC0ahh6KdQlN+Am8CM69g gXvFgEjgQjed9i0oHz0EjLYiCtT3pFnEviQYNkOE0zmVZFqAGNYaABmBb+DjBpjdyj k2+E/02lOYn7Y0zoQ/xVPqwKa3iTQzBoPM9/aWdV7uMY4kmkvLiYRjCvwkKMQsX8xQ dV50mkXm/QsXA== Received: from [192.168.129.26] (i114-186-197-142.s41.a008.ap.plala.or.jp [114.186.197.142]) by pv50p00im-ztdg10021901.me.com (Postfix) with ESMTPSA id DAA018805CC for ; Sat, 14 Nov 2020 16:58:36 +0000 (UTC) From: tsuucat Content-Type: multipart/mixed; boundary="Apple-Mail=_7B056D47-FBDE-4C09-95A7-44213D00AD73" Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: [PATCH] Ignore modifiers when processing WM_IME_CHAR messages Message-Id: <37440825-0135-48E1-A5A0-1DB122C09F6A@icloud.com> Date: Sun, 15 Nov 2020 01:58:34 +0900 To: bug-gnu-emacs@gnu.org X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-11-14_07:2020-11-13, 2020-11-14 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=794 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2006250000 definitions=main-2011140114 Received-SPF: pass client-ip=17.58.6.55; envelope-from=tsuucat@icloud.com; helo=pv50p00im-ztdg10021901.me.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/14 11:58:37 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --Apple-Mail=_7B056D47-FBDE-4C09-95A7-44213D00AD73 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Current Emacs for Windows recognizes modifier keys even when inputting with IME. Some IMEs use modifier keys to input characters, so this causes inconvenient for such IME users. Example: Microsoft IME (Japanese input method) If I type Ctrl+m to input =E3=81=93=E3=82=93=E3=81=AB=E3=81=A1=E3=81=AF, = I get C-=E3=81=93 C-=E3=82=93 C-=E3=81=AB C-=E3=81=A1 C-=E3=81=AF in Emacs. This patch ignores modifier keys when processing WM_IME_CHAR messages. This patch is not intended to introduce Windows specific behavior; X build already ignores modifier keys when processing inputs via XIM. src/xterm.c: ... nbytes =3D XmbLookupString (FRAME_XIC (f), &xkey, (char *) copy_bufptr, copy_bufsiz, &keysym, &status_return); ... else if (status_return =3D=3D XLookupChars) { keysym =3D NoSymbol; modifiers =3D 0; } ... -- tsuucat --Apple-Mail=_7B056D47-FBDE-4C09-95A7-44213D00AD73 Content-Disposition: attachment; filename=0001-Ignore-modifiers-when-processing-WM_IME_CHAR-message.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Ignore-modifiers-when-processing-WM_IME_CHAR-message.patch" Content-Transfer-Encoding: quoted-printable =46rom=20431f3d821cfef8fad30d39e0b4e7a31be9d02872=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Masahiro=20Nakamura=20=0A= Date:=20Sat,=2014=20Nov=202020=2017:55:16=20+0900=0ASubject:=20[PATCH]=20= Ignore=20modifiers=20when=20processing=20WM_IME_CHAR=20messages=0A=0A*=20= src/w32fns.c=20(w32_wnd_proc):=20Ignore=20modifiers=20when=20processing=0A= WM_IME_CHAR=20messages.=0A---=0A=20src/w32fns.c=20|=202=20+-=0A=201=20= file=20changed,=201=20insertion(+),=201=20deletion(-)=0A=0Adiff=20--git=20= a/src/w32fns.c=20b/src/w32fns.c=0Aindex=207bb96891d0..802ee031e8=20= 100644=0A---=20a/src/w32fns.c=0A+++=20b/src/w32fns.c=0A@@=20-4448,7=20= +4448,7=20@@=20w32_wnd_proc=20(HWND=20hwnd,=20UINT=20msg,=20WPARAM=20= wParam,=20LPARAM=20lParam)=0A=20=09=20=20int=20size,=20i;=0A=20=09=20=20= W32Msg=20wmsg;=0A=20=09=20=20HIMC=20context=20=3D=20get_ime_context_fn=20= (hwnd);=0A-=09=20=20wmsg.dwModifiers=20=3D=20w32_get_key_modifiers=20= (wParam,=20lParam);=0A+=09=20=20wmsg.dwModifiers=20=3D=200;=0A=20=09=20=20= /*=20Get=20buffer=20size.=20=20*/=0A=20=09=20=20size=20=3D=20= get_composition_string_fn=20(context,=20GCS_RESULTSTR,=20NULL,=200);=0A=20= =09=20=20buffer=20=3D=20alloca=20(size);=0A--=20=0A2.27.0=0A=0A= --Apple-Mail=_7B056D47-FBDE-4C09-95A7-44213D00AD73 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_7B056D47-FBDE-4C09-95A7-44213D00AD73-- From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 14 12:25:07 2020 Received: (at 44641) by debbugs.gnu.org; 14 Nov 2020 17:25:07 +0000 Received: from localhost ([127.0.0.1]:51917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdzIR-0004hO-Da for submit@debbugs.gnu.org; Sat, 14 Nov 2020 12:25:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53908) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdzIP-0004gm-LF for 44641@debbugs.gnu.org; Sat, 14 Nov 2020 12:25:05 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58193) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdzIK-0003Xb-BK; Sat, 14 Nov 2020 12:25:00 -0500 Received: from [176.228.60.248] (port=1050 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kdzIJ-0007kh-JZ; Sat, 14 Nov 2020 12:25:00 -0500 Date: Sat, 14 Nov 2020 19:24:48 +0200 Message-Id: <834klrvokf.fsf@gnu.org> From: Eli Zaretskii To: tsuucat In-Reply-To: <37440825-0135-48E1-A5A0-1DB122C09F6A@icloud.com> (bug-gnu-emacs@gnu.org) Subject: Re: bug#44641: [PATCH] Ignore modifiers when processing WM_IME_CHAR messages References: <37440825-0135-48E1-A5A0-1DB122C09F6A@icloud.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44641 Cc: 44641@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sun, 15 Nov 2020 01:58:34 +0900 > From: tsuucat via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Current Emacs for Windows recognizes modifier keys even when inputting > with IME. Some IMEs use modifier keys to input characters, so this > causes inconvenient for such IME users. You say "some IMEs", so I wonder whether ignoring modifier keys for WM_IME_CHAR is always the right thing. Do you know for sure? is that documented somewhere? (I'm not an expert on MS-Windows IMEs.) Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 15 22:07:38 2020 Received: (at 44641) by debbugs.gnu.org; 16 Nov 2020 03:07:38 +0000 Received: from localhost ([127.0.0.1]:54723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keUri-0000A0-H6 for submit@debbugs.gnu.org; Sun, 15 Nov 2020 22:07:38 -0500 Received: from pv50p00im-zteg10021301.me.com ([17.58.6.46]:49544) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keUrg-00009l-1F for 44641@debbugs.gnu.org; Sun, 15 Nov 2020 22:07:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1605496050; bh=FqkbZfII6YlZoE2QrjQxu93RxalZXbZWpeYMWT0Y41k=; h=Content-Type:Mime-Version:Subject:From:Date:Message-Id:To; b=THULtkS7q+IEMdKV4I92tjqYvDVa/jvkkIcQk5n3CVTJ9jlaW74ByGuRuHD+hYQxh bg4UO+hB2iKu+90EZ2hqkX2qL2J6MS/cqOg7bZa38S/VP2bTNxeaDLeOgt9n55dTaf iqygVNvuqK87bh8/Z8PWwSaPhYXOaRDuCKJN8cmIr1gqrOwDPBQNYZEV3lukyqvMa0 Nzc4BpTCLt9pR5e3Lp+NyXOEsufCujYe/IAZIgup7CFOb/TOzUyKgg5balUFzAN8cs 5NuRCl9yf3M1wUZDM/L+doaQw81sRWUBZy/XBHHRyB9YwiHjNPlN/+l611zO2GxOED jTIWHFE0FHYkA== Received: from [192.168.129.26] (i114-186-197-142.s41.a008.ap.plala.or.jp [114.186.197.142]) by pv50p00im-zteg10021301.me.com (Postfix) with ESMTPSA id D825CCC029A; Mon, 16 Nov 2020 03:07:28 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: bug#44641: [PATCH] Ignore modifiers when processing WM_IME_CHAR messages From: tsuucat In-Reply-To: <834klrvokf.fsf@gnu.org> Date: Mon, 16 Nov 2020 12:07:26 +0900 Content-Transfer-Encoding: 7bit Message-Id: References: <37440825-0135-48E1-A5A0-1DB122C09F6A@icloud.com> <834klrvokf.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-11-16_01:2020-11-13, 2020-11-16 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2006250000 definitions=main-2011160021 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 44641 Cc: 44641@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> Current Emacs for Windows recognizes modifier keys even when inputting >> with IME. Some IMEs use modifier keys to input characters, so this >> causes inconvenient for such IME users. > > You say "some IMEs", so I wonder whether ignoring modifier keys for > WM_IME_CHAR is always the right thing. Do you know for sure? is that > documented somewhere? (I'm not an expert on MS-Windows IMEs.) I believe this change will not affect other IME users. Other IME users simply don't use modifier keys to input multibyte characters. For example, Chinese IME users type Space to select and input the candidate, but typing Ctrl+Space doesn't mean users select and input the candidate (= WM_IME_CHAR messages will not happen). Some Japanese IME users type Ctrl+m or Ctrl+n to select and input the candidate and they want to send Ctrl to IME not to Emacs. I don't have just the right documentation but this change just follows the way X build Emacs does. -- tsuucat From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 21 03:18:55 2020 Received: (at 44641-done) by debbugs.gnu.org; 21 Nov 2020 08:18:55 +0000 Received: from localhost ([127.0.0.1]:44831 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kgO6h-0005tY-6X for submit@debbugs.gnu.org; Sat, 21 Nov 2020 03:18:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59000) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kgO6e-0005tK-MY for 44641-done@debbugs.gnu.org; Sat, 21 Nov 2020 03:18:54 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54960) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kgO6Z-0007TG-EB; Sat, 21 Nov 2020 03:18:47 -0500 Received: from [176.228.60.248] (port=1502 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kgO6Y-0003p0-Sr; Sat, 21 Nov 2020 03:18:47 -0500 Date: Sat, 21 Nov 2020 10:18:36 +0200 Message-Id: <83d007yvfn.fsf@gnu.org> From: Eli Zaretskii To: tsuucat In-Reply-To: (message from tsuucat on Mon, 16 Nov 2020 12:07:26 +0900) Subject: Re: bug#44641: [PATCH] Ignore modifiers when processing WM_IME_CHAR messages References: <37440825-0135-48E1-A5A0-1DB122C09F6A@icloud.com> <834klrvokf.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44641-done Cc: 44641-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: tsuucat > Date: Mon, 16 Nov 2020 12:07:26 +0900 > Cc: 44641@debbugs.gnu.org > > > >> Current Emacs for Windows recognizes modifier keys even when inputting > >> with IME. Some IMEs use modifier keys to input characters, so this > >> causes inconvenient for such IME users. > > > > You say "some IMEs", so I wonder whether ignoring modifier keys for > > WM_IME_CHAR is always the right thing. Do you know for sure? is that > > documented somewhere? (I'm not an expert on MS-Windows IMEs.) > > I believe this change will not affect other IME users. Other IME users > simply don't use modifier keys to input multibyte characters. For > example, Chinese IME users type Space to select and input the > candidate, but typing Ctrl+Space doesn't mean users select and input > the candidate (= WM_IME_CHAR messages will not happen). > > Some Japanese IME users type Ctrl+m or Ctrl+n to select and input the > candidate and they want to send Ctrl to IME not to Emacs. > > I don't have just the right documentation but this change just follows > the way X build Emacs does. OK, thanks. I installed your changes on the emacs-27 branch, but I also added a variable, w32-ignore-modifiers-on-IME-input, that allows to get back the old behavior, in case the new behavior adversely effects some use cases. With that, I'm closing this bug report. From unknown Sun Aug 17 22:09:25 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 19 Dec 2020 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator