Mac键盘映射工具:karabiner

by Web全栈工程师 on 2015 年 05 月 12 日

karabiner可以在普通PC键盘映射mac的按键

实现功能:

PC键盘 VS Mac键盘
左 ctrl+win+Alt 对应 control+option+command
菜单键 设为 fn
f1-f3 控制亮度
f2 mission control
f4 launchpad
f5-f6 键盘背光
f7-f9 媒体控制
f10-f12 音量控制
Delete 设置为了Command+Delete一键删除文件

private.xml配置文件:




  
    COMPAQ_KEYBORD
    COMPAQ_KEYBORD
    private.hyperspace2Control

    __KeyToKey__ KeyCode::PC_APPLICATION, KeyCode::FN

    __KeyToKey__ KeyCode::COMMAND_L, KeyCode::OPTION_L
    __KeyToKey__ KeyCode::OPTION_L, KeyCode::COMMAND_L

    __KeyToKey__ KeyCode::F1, ConsumerKeyCode::BRIGHTNESS_DOWN
    __KeyToKey__ KeyCode::F2, ConsumerKeyCode::BRIGHTNESS_UP
    __KeyToKey__ KeyCode::F3, KeyCode::EXPOSE_ALL
    __KeyToKey__ KeyCode::F4, KeyCode::DASHBOARD
    __KeyToKey__ KeyCode::F7, ConsumerKeyCode::MUSIC_PREV
    __KeyToKey__ KeyCode::F8, ConsumerKeyCode::MUSIC_PLAY
    __KeyToKey__ KeyCode::F9, ConsumerKeyCode::MUSIC_NEXT
    __KeyToKey__ KeyCode::F10, ConsumerKeyCode::VOLUME_MUTE
    __KeyToKey__ KeyCode::F11, ConsumerKeyCode::VOLUME_DOWN
    __KeyToKey__ KeyCode::F12, ConsumerKeyCode::VOLUME_UP

    __KeyToKey__ KeyCode::FORWARD_DELETE, KeyCode::DELETE, ModifierFlag::COMMAND_L

  


OS 10.12 以上 系统需要使用开发版本Karabiner-Elements
参考资料:https://pqrs.org/osx/karabiner/index.html.en

Comments on this entry are closed.

Previous post:

Next post: