问题
I've got:
(global-set-key '[f11] 'menu-bar-mode)
How can I bind it to left ALT
/ Meta
and will there be conflicts of using alt as meta?
回答1:
You can't bind a function to a modifier key, because Emacs does not receive any input when a modifier key is pressed on its own (or more accurately, when one or more modifier keys are pressed without a non-modifier key also being pressed).
n.b. Your operating system determines which keys are modifiers, not Emacs.
You could probably tell your OS not to use the left Alt key as the Meta modifier and to instead send some sequence which you could then configure Emacs to recognise. You would want to configure some other key as the Meta modifier in that case of course, unless you are happy using right Alt exclusively.
I'm unsure precisely how you'd do that, but in a Unix-like OS reading up on xmodmap
is typically the first port of call.
来源:https://stackoverflow.com/questions/26500567/can-i-bind-something-to-alt-meta