Re: keybinding with shift key syntax. C-S-n vs C-N
  Home FAQ Contact Sign in
gnu.emacs.help only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: keybinding with shift key syntax. C-S-n vs C-N         

Group: gnu.emacs.help · Group Profile
Author: Xah
Date: Sep 16, 2008 12:35

On Sep 15, 12:44 pm, Oleksandr Gavenko 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/
ق˜„
no comments
diggit! del.icio.us! reddit!