From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Walker Pendleton Newsgroups: gmane.emacs.help Subject: Re: "translated from" keystrokes Date: Thu, 16 Sep 2004 10:34:11 -0700 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1095356367 1822 80.91.229.6 (16 Sep 2004 17:39:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 16 Sep 2004 17:39:27 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 16 19:39:23 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C80E7-0003zi-00 for ; Thu, 16 Sep 2004 19:39:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C80Jn-0004Tb-Mr for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Sep 2004 13:45:15 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.speakeasy.net!news.speakeasy.net.POSTED!not-for-mail Original-NNTP-Posting-Date: Thu, 16 Sep 2004 12:34:11 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:UM4LoZrJ68ZtThE1lNzzNnsrolo= Original-Lines: 27 Original-NNTP-Posting-Host: 69.17.54.69 Original-X-Trace: sv3-incFRS6aWLF9kyjDSvCn2Q3xZf+5FNxYkoCtlCSUt/x8ccTUtpxXJm7Cp5GkP1swRcapz7lbSbkKR5J!rt1L0EvhJv6ZC2z9LxX61xzW6H2EqpvLT/NeJkJUhAz7weJpJrNJnxs87q8YzCgxAThaQm6UAp8G!MNA= Original-X-Complaints-To: abuse@speakeasy.net X-DMCA-Complaints-To: abuse@speakeasy.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.13 Original-Xref: shelby.stanford.edu gnu.emacs.help:125362 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:20717 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:20717 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.