MacVim, remapping Alt-key as Ctrl-key

2019-08-09 04:19发布

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.

标签: macvim vim
1条回答
Juvenile、少年°
2楼-- · 2019-08-09 05:10

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!

查看更多
登录 后发表回答