Can I bind something to ALT (Meta)

后端 未结 1 1154
礼貌的吻别
礼貌的吻别 2021-01-24 05:52

I\'ve got:

(global-set-key \'[f11] \'menu-bar-mode)

How can I bind it to left ALT / Meta and will there be conflicts

相关标签:
1条回答
  • 2021-01-24 06:27

    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.

    0 讨论(0)
提交回复
热议问题