Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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).

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

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.)

share|improve this answer
1  
It's also the case for graphical versions of emacs. –  Trey Jackson Nov 26 '10 at 21:42
    
Booo - oh well. –  ne0sonic Nov 27 '10 at 3:25
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.