From unknown Tue Jun 17 20:14:43 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#966 <966@debbugs.gnu.org> To: bug#966 <966@debbugs.gnu.org> Subject: Status: keybinding involving Ctrl and Shift and letter Reply-To: bug#966 <966@debbugs.gnu.org> Date: Wed, 18 Jun 2025 03:14:43 +0000 retitle 966 keybinding involving Ctrl and Shift and letter reassign 966 emacs submitter 966 xah lee severity 966 normal thanks From xah@xahlee.org Thu Sep 11 20:46:28 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.3 required=4.0 tests=AWL,BAYES_00,FOURLA, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 12 Sep 2008 03:46:29 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8C3kO2i028747 for ; Thu, 11 Sep 2008 20:46:26 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kdzc0-00021D-Hf for bug-gnu-emacs@gnu.org; Thu, 11 Sep 2008 23:46:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kdzby-000211-Dd for bug-gnu-emacs@gnu.org; Thu, 11 Sep 2008 23:46:23 -0400 Received: from [199.232.76.173] (port=60545 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kdzby-00020y-AH for bug-gnu-emacs@gnu.org; Thu, 11 Sep 2008 23:46:22 -0400 Received: from mout.perfora.net ([74.208.4.196]:57548) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kdzby-00009b-Il for bug-gnu-emacs@gnu.org; Thu, 11 Sep 2008 23:46:22 -0400 Received: from [192.168.1.4] (c-24-6-185-159.hsd1.ca.comcast.net [24.6.185.159]) by mrelay.perfora.net (node=mrus1) with ESMTP (Nemesis) id 0MKpCa-1Kdzbv0Nuu-0005ZY; Thu, 11 Sep 2008 23:46:21 -0400 Mime-Version: 1.0 (Apple Message framework v753.1) Content-Transfer-Encoding: quoted-printable Message-Id: <6194437C-110E-411F-8CC0-E9FF529C5C6D@xahlee.org> Content-Type: text/plain; charset=UTF-8; delsp=yes; format=flowed To: bug-gnu-emacs@gnu.org From: xah lee Subject: keybinding involving Ctrl and Shift and letter Date: Thu, 11 Sep 2008 20:46:22 -0700 X-Mailer: Apple Mail (2.753.1) X-Provags-ID: V01U2FsdGVkX1+YCoyxS35O3FMfY3KysM5wD8X3QgsbNx8zqyd NajPo5E+iyIckUye5E7s/FpLQSlQtchVRU7TiQa2FKK6jbuAq8 p0fqZ+bFko0lMWz/LaSGw== X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. This seems to be a bug. i'm trying to set keybindings for both Ctrl+n and Ctrl+Shift+n, by: (global-set-key (kbd "C-N") 'f1) (global-set-key (kbd "C-n") 'f2) however, that doesn't work. Emacs will take both Ctrl+Shift+n and Ctrl+Shift+n to be whichever is =20= evaluated last. In this case, f2. But the following works: (global-set-key (kbd "C-S-n") 'f1) (global-set-key (kbd "C-n") 'f2) This seems to contradict with Meta's ways. That is (kbd "M-N") works =20 but not (kbd "M-S-n"). Xah =E2=88=91 http://xahlee.org/ =E2=98=84 In GNU Emacs 22.2.1 (powerpc-apple-darwin8.11.0, Carbon Version 1.6.0) of 2008-04-05 on g5.tokyo.stp.isas.jaxa.jp Windowing system distributor `Apple Inc.', version 10.4.11 configured using `configure '--prefix=3D/Applications/Emacs.app/=20 Contents/Resources' '--with-carbon' '--without-x' '--libexecdir=3D/=20 Volumes/Emacs/Emacs.app/Contents/MacOS/libexec' 'CFLAGS=3D-Os -arch =20 i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -DUSE_ATSUI -=20= DUSE_MAC_TSM'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil locale-coding-system: iso-8859-1 default-enable-multibyte-characters: t =E2=98=84 From cyd@stupidchicken.com Wed Sep 17 13:04:52 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-3.8 required=4.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 966-done) by emacsbugs.donarmstrong.com; 17 Sep 2008 20:04:53 +0000 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8HK4nId013680 for <966-done@emacsbugs.donarmstrong.com>; Wed, 17 Sep 2008 13:04:51 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id 06F8B57E32F; Wed, 17 Sep 2008 16:08:31 -0400 (EDT) From: Chong Yidong To: xah lee Cc: 966-done@debbugs.gnu.org Subject: keybinding involving Ctrl and Shift and letter Date: Wed, 17 Sep 2008 16:08:31 -0400 Message-ID: <87hc8eilhc.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > i'm trying to set keybindings for both Ctrl+n and Ctrl+Shift+n, by: > > (global-set-key (kbd "C-N") 'f1) > (global-set-key (kbd "C-n") 'f2) > > however, that doesn't work. > Emacs will take both Ctrl+Shift+n and Ctrl+Shift+n to be whichever is > evaluated last. In this case, f2. > > But the following works: > > (global-set-key (kbd "C-S-n") 'f1) > (global-set-key (kbd "C-n") 'f2) > > This seems to contradict with Meta's ways. This is a legacy of ASCII. Taking a look at an ASCII chart, you'll see that ^A (control-a) through ^Z (control-z) map to ASCII codes 1 through 26, and these control keys are not case sensitive: control-a is equivalent to control-A. Emacs extends ASCII, which allows us to define things like C-] which are not present in ASCII. However, (kbd "C-N") and (kbd "C-n") still both evaluate to ^N. From xah@xahlee.org Wed Sep 17 15:48:24 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-4.8 required=4.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 966-done) by emacsbugs.donarmstrong.com; 17 Sep 2008 22:48:24 +0000 Received: from mout.perfora.net (mout.perfora.net [74.208.4.197]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8HMmLlK023045 for <966-done@emacsbugs.donarmstrong.com>; Wed, 17 Sep 2008 15:48:22 -0700 Received: from [192.168.1.4] (c-24-6-185-159.hsd1.ca.comcast.net [24.6.185.159]) by mrelay.perfora.net (node=mrus1) with ESMTP (Nemesis) id 0MKpCa-1Kg5om2W7k-0005PF; Wed, 17 Sep 2008 18:48:19 -0400 In-Reply-To: <87hc8eilhc.fsf@cyd.mit.edu> References: <87hc8eilhc.fsf@cyd.mit.edu> Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=UTF-8; delsp=yes; format=flowed Message-Id: Cc: 966-done@debbugs.gnu.org Content-Transfer-Encoding: quoted-printable From: xah lee Subject: Re: keybinding involving Ctrl and Shift and letter Date: Wed, 17 Sep 2008 15:48:00 -0700 To: Chong Yidong X-Mailer: Apple Mail (2.753.1) X-Provags-ID: V01U2FsdGVkX188725Ac29HsiNdJW91vbwtDcQ2XcAV3QkyAmU +fmIp0MFwyuDX9qaEsfJaSf55jD0skGTeDXRXS/vXfSQ2B8ASC VXSFUtMqux2Ol9sEh5XfQ== umm... thanks for the answer. I think there is still a problem, that is, inconsistency with the =20 meta notation. Namely, when defining a key with Ctrl or Meta with a Shift and a =20 letter, when it is Meta, (global-set-key (kbd "M-N") 'f) works but (global-set-key (kbd "M-S-n") 'f) does not work. But with Ctrl, it is the the other way around. Shouldn't emacs make "M-S-n" notation work and not "M-N", so that it =20 is consistant with the Control? In summary, the notation for a Meta/Control+Shift+=E2=80=B9letter=E2=80=BA= =20 keybinding used in macro is not consistant. For Meta, "-N" is =20 effective but for Control, "-S-n" is effective. Xah =E2=88=91 http://xahlee.org/ =E2=98=84 On Sep 17, 2008, at 1:08 PM, Chong Yidong wrote: > i'm trying to set keybindings for both Ctrl+n and Ctrl+Shift+n, by: > > (global-set-key (kbd "C-N") 'f1) > (global-set-key (kbd "C-n") 'f2) > > however, that doesn't work. > Emacs will take both Ctrl+Shift+n and Ctrl+Shift+n to be whichever is > evaluated last. In this case, f2. > > But the following works: > > (global-set-key (kbd "C-S-n") 'f1) > (global-set-key (kbd "C-n") 'f2) > > This seems to contradict with Meta's ways. This is a legacy of ASCII. Taking a look at an ASCII chart, you'll see that ^A (control-a) through ^Z (control-z) map to ASCII codes 1 through 26, and these control keys are not case sensitive: control-a is equivalent to control-A. Emacs extends ASCII, which allows us to define things like C-] which are not present in ASCII. However, (kbd "C-N") and (kbd "C-n") still both evaluate to ^N. =E2=98=84 From unknown Tue Jun 17 20:14:43 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Thu, 16 Oct 2008 14:24:03 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator