0

Is it possible to bind a command in emacs to the Alt key (not some combination of Alt+ where Alt is behaving as Meta)? What I want to do is to bind tmm-menubar command to the Alt key (rather than F10).

2 Answers 2

3

In terminals, Alt or Meta is only a modifier, it does not send any sequence when pressed. So you cannot map anything to it.

(I don't know about the graphical versions of emacs.)

2
  • 1
    It's also the case for graphical versions of emacs. Nov 26, 2010 at 21:42
  • Booo - oh well.
    – ne0sonic
    Nov 27, 2010 at 3:25
0

Grawity has the simple (and correct) answer.

However, depending on your OS, there may be other options for you. You could remap the Alt to be some other, non-modifier key, perhaps one not available on your keyboard (like F15). In general this will be done universally, which means it will affect all applications, something you may not want. However, it is possible that your OS supports application-specific mappings. Just throwing out alternatives.

By way of example, I'm running Ubuntu and I've re-mapped the Caps-Lock key be the Windows key, so that it brings up my OS's 'Start' menu, leaving the real Windows key to be the Super modifier key. I've done this for all applications, but that's fine for me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .