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

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

Re: "translated from" keystrokes


From: J. David Boyd
Subject: Re: "translated from" keystrokes
Date: 16 Sep 2004 15:31:22 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Walker Pendleton <wpendleton@kitinteractive.com> writes:

> On 16 Sep 2004, J. David Boyd wrote:
> > When I C-h k C-S-w, I get this message:
> >
> > C-w (translated from C-S-w) runs the command kill-region
> >
> > I looked through the emacs docs, and it says that key translations
> > are explained in the elisp manual, and I've read through that, but
> > probably not enough, as I still don't know how to break this
> > translation, so I can assign a function to C-S-w.
> >
> > Now, I can put the following text into my scratch buffer
> > (global-set-key [control shift w] 'emacs-uptime) and evaluate it
> > with C-x C-e, and the mode line says emacs-uptime.
> 
> Try using "kbd" in your call to global-set-key.  I find it's syntax
> much easier to figure out than trying to give emacs the `canonical
> name' of a particular key sequence.
> 
> ,----
> | (global-set-key (kbd "C-S-w") 'emacs-uptime)
> `----
> 
> > Still, C-h k C-S-w reports kill-region.  Actually, C-h k shows that
> > it is reporting on C-w, so the key translation must be happening at
> > a very low level.
> 
> The translation only happens if there's no C-S-w binding.

Ah, great tip, and it worked perfectly.  Thank you so much!

Dave




reply via email to

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