MacVim, remapping Alt-key as Ctrl-key

你离开我真会死。 提交于 2020-01-05 06:54:31

问题


I am a MacVim user, and I would like to know if it's possible to make the Alt-Option key behave as a Ctrl key.

Thanks for your time.


回答1:


I couldn't find a way of doing it inside MacVim, but KeyRemap4Macbook did the trick. It is a FANTASTIC piece of software, the documentation is just excellent, I recommend it to everybody in difficult mapping situations. It allows you to customize mappings for each app, in an xml file that you can open from inside the app. It's absolutely poka-yoke. This is what I wrote in private.xml, for my situation:

<appdef>
<appname>MacVim</appname>
<equal>org.vim.MacVim</equal>
</appdef>


<item>
<name>Change Right Option key to Control</name>
<identifier>private.remap_rightOption_to_control</identifier>
    <only>MacVim</only>
<autogen>__KeyToKey__ KeyCode::OPTION_R, KeyCode::CONTROL_R</autogen>
</item>

Problem solved!



来源:https://stackoverflow.com/questions/15248495/macvim-remapping-alt-key-as-ctrl-key

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!