all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "B. T. Raven" <nihil@nihilo.net>
To: help-gnu-emacs@gnu.org
Subject: Re: keybinding with shift key syntax. C-S-n vs C-N
Date: Wed, 17 Sep 2008 10:52:42 -0500	[thread overview]
Message-ID: <c4-dnWZkQ_ReukzVnZ2dnUVZ_uadnZ2d@sysmatrix.net> (raw)
In-Reply-To: <8ad1d6ac-9b4e-492c-82fe-79b630a2b116@b30g2000prf.googlegroups.com>

Xah wrote:
> On Sep 15, 12:44 pm, Oleksandr Gavenko <gaven...@gmail.com> wrote:
>> I try all write. Same behavior
>> (GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600) of 2007-06-02 on RELEASE).
>>
>> (global-set-key (kbd "M-S-n") 'f1) do not define key binding, but
>> (global-set-key (kbd "M-n") 'f2) do for both M-n and M-N.
> 
> I might have miscommunicated. I try again:
> 
> I want to define a keybinding with the Shift down. e.g. Ctrl+Shift+n.
> 
> In emacs, it appears there are 2 notations that can be used.
> 
> 1. (kbd "C-S-n")
> 2. (kbd "C-N")
> 
> however, this does not seems to work property.
> 
>   Xah
> ∑ http://xahlee.org/
> 
> ☄
> 
> ---------------------
> 
> 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
> 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
> but not (kbd "M-S-n").
> 
> I filed a bug but no response. Can anyone reproduce this?
> 
>   Xah
> ∑ http://xahlee.org/
> ☄

Vector notation also works reliably, at least in version 22. I have this 
in my .emacs:

(global-set-key [(control f)] 'find-function-at-point)
(global-set-key [(shift control f)] 'find-variable-at-point)


Ed


  reply	other threads:[~2008-09-17 15:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-15  9:59 keybinding with shift key syntax. C-S-n vs C-N Xah
2008-09-15 19:44 ` Oleksandr Gavenko
2008-09-16 19:35   ` Xah
2008-09-17 15:52     ` B. T. Raven [this message]
2008-09-17 22:51     ` Xah

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=c4-dnWZkQ_ReukzVnZ2dnUVZ_uadnZ2d@sysmatrix.net \
    --to=nihil@nihilo.net \
    --cc=help-gnu-emacs@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.