0

I am trying to override Control-Meta-Down Arrow and Control-Meta-Up Arrow in emacs.

I've tried all sorts of combinations of: (global-set-key [C-M-down] 'function) and: "\C-\M-<down>" etc... but it always says: ESC undefined. This means it is only taking into account the M-<down>. Why is it ignoring the Control?? I've been working on this for 3 hours and emacs online documentation with regards to key bindings is surprisingly absolutely terrible.

4
  • when does Emacs say ESC undefined? To see what bindings have been made, type C-h b, and then you'll see what (if anything) 'function was bound to. (alternatively C-h w function) Commented May 21, 2012 at 19:31
  • If I hit: C-h k then hit Ctrl-Meta-down, it says ESC undefined. Meaning, it never even got the ctrl key press. Why is that? Commented May 21, 2012 at 19:34
  • Does it work when you start Emacs without your init-file? Commented May 21, 2012 at 20:08
  • Can I ask you who got you started using Emacs in a Terminal? This question and the one about TERM export are the most asked questions here about Emacs. Commented May 22, 2012 at 4:47

2 Answers 2

3

When using Emacs in the terminal (which you mentioned in a comment), you are limited to the key sequences that the terminal is capable of. Unfortunately, C-down is not one of them...

Sign up to request clarification or add additional context in comments.

2 Comments

So what sequences is the terminal not capable of? And so what would you recommend to bind scroll-other-window and scroll-other-window-down to in a logical manner, where scroll-other-window scrolls down and scroll-other-window-down scrolls up?
Well, C-c LETTER is reserved for your own bindings, so maybe C-c p and C-c n?
0

Some versions of Emacs on Mac OS X have had problems with the qualifier keys. Try to update it to a newer version.

I tested this on an Emacs built from the source archive, and it works as intended. (In this case, it simply says that function is not defined, which is what expected.)

2 Comments

Which distribution? I just tested this on the one from emacsformacosx.com and it works correctly.
I am using the terminal based one. That Emacs (I tested it too) works fine. Why doesn't it work with the terminal based Emacs?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.