From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Harshdeep S Jawanda Newsgroups: gmane.emacs.help Subject: Re: Trying to global-set-key Date: Tue, 03 Jun 2003 15:53:24 -0600 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3EDD18D4.6000508@cs.unm.edu> References: <3EDD0E07.5020000@yahoo.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1054677304 15342 80.91.224.249 (3 Jun 2003 21:55:04 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 3 Jun 2003 21:55:04 +0000 (UTC) Cc: ihs_4664@yahoo.com Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 03 23:55:00 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19NJjc-0003wV-00 for ; Tue, 03 Jun 2003 23:54:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19NJjo-0002og-ML for gnu-help-gnu-emacs@m.gmane.org; Tue, 03 Jun 2003 17:54:36 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19NJf8-0000tm-QK for help-gnu-emacs@gnu.org; Tue, 03 Jun 2003 17:49:46 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19NJem-0000bf-5m for help-gnu-emacs@gnu.org; Tue, 03 Jun 2003 17:49:24 -0400 Original-Received: from mail.cs.unm.edu ([64.106.20.33] helo=jah.cs.unm.edu) by monty-python.gnu.org with esmtp (Exim 4.20) id 19NJeU-0000Wn-KA for help-gnu-emacs@gnu.org; Tue, 03 Jun 2003 17:49:06 -0400 Original-Received: from [129.24.116.53] (helo=cs.unm.edu) by jah.cs.unm.edu with asmtp (Exim 3.36 #2) id 19NJeU-0006Ta-00; Tue, 03 Jun 2003 15:49:06 -0600 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en Original-To: help-gnu-emacs@gnu.org In-Reply-To: <3EDD0E07.5020000@yahoo.com> X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:10565 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:10565 Kevin Rodgers wrote: > But if you mean that you want to be able to type C-down instead > of `C-u 1 C-v', Yes, that is exactly what I mean to say. > then the simplest thing is to define a keyboard macro: > > (global-set-key [C-down] (kbd "C-u 1 C-v")) I tried this: doesn't work. Basically, I think the problem is that Emacs is not recognizing the Ctrl key as a modifier when used with the down arrow key. > That ought to work, but perhaps a local key binding is shadowing the > global > binding. What happens if you type `C-h k' followed by C-down? It only says " runs the command next-line". It doesn't recognize that the Ctrl key has also been pressed. When I write (global-set-key [next] '"\C-u1\C-v"), it works fine. I just need to tell Emacs to modify behavior only when Ctrl key is pressed. > What does `C-h l' show immediately after that? Well, if you really want to know: C-x b RET ESC [ A ESC [ A ESC [ A ESC [ B ESC [ B ESC [ B C-h k ESC [ B C-h l I personally can't make head or tail of it :-). Thanks for your help, though. I have near-zero knowledge of elisp -- I am only trying out the things I can glean from the info files :-). -- Harshdeep S Jawanda