unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: Trying to global-set-key
Date: Tue, 03 Jun 2003 15:07:19 -0600	[thread overview]
Message-ID: <3EDD0E07.5020000@yahoo.com> (raw)
In-Reply-To: mailman.7223.1054666197.21513.help-gnu-emacs@gnu.org

Harshdeep S Jawanda wrote:

> I want to global-set-key C-u 1 C-v (scroll-up) to C-down in my .emacs 
> file. How do I do that?


You can't, exactly: that would mean that `C-u 1' is a prefix key, but `C-u'
is already bound to universal-argument (which is a binding you want to retain
-- trust me).  But if you mean that you want to be able to type C-down instead
of `C-u 1 C-v', then the simplest thing is to define a keyboard macro:

(global-set-key [C-down] (kbd "C-u 1 C-v"))


> As a starting point I tried: (global-set-key [C-down] 'scroll-up), but 
> that doesn't seem to do even a simple scroll-up.  When I do C-h a for 
> scroll-up, the keybinding shows up, but it doesn't seem to work.

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?  What does
`C-h l' show immediately after that?

-- 
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

       reply	other threads:[~2003-06-03 21:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.7223.1054666197.21513.help-gnu-emacs@gnu.org>
2003-06-03 21:07 ` Kevin Rodgers [this message]
2003-06-03 21:53   ` Trying to global-set-key Harshdeep S Jawanda
     [not found]   ` <mailman.7232.1054677270.21513.help-gnu-emacs@gnu.org>
2003-06-03 23:16     ` Stefan Monnier
2003-06-03 18:53 Harshdeep S Jawanda
2003-06-03 21:18 ` Harshdeep S Jawanda

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3EDD0E07.5020000@yahoo.com \
    --to=ihs_4664@yahoo.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).