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

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

Re: Trying to global-set-key


From: Harshdeep S Jawanda
Subject: Re: Trying to global-set-key
Date: Tue, 03 Jun 2003 15:53:24 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312

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 "<down> 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







reply via email to

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