玩转MacMac软件优雅使用手册1.0MAC优雅使用指南

Mac 学习笔记(五)键位映射

2015-11-22  本文已影响6968人  一肩月光
MLA22LL

将普通的PC键盘、机械键盘等,映射成为 Mac键盘布局
Automator > Service > Launch Application > no input > Keyboard > Shortcuts >Services

一、下载软件

Karabiner:键盘映射 [https://pqrs.org/osx/karabiner/index.html.en]

二、苹果键位参考

MB110CH

三、常用设置

在"Change Command_L Key (Left Command)"下面选择"Command_L to Option_L"
在"Change Command_L Key (Left Command)"下面选择"Command_L to Option_L"

四、保存自己的配置

    <autogen> __KeyToKey__ KeyCode::A, KeyCode::B </autogen>
    <autogen> __KeyToKey__ KeyCode::B, KeyCode::A </autogen> 
<autogen> __KeyToKey__ KeyCode::A, ModifierFlag::MOD, KeyCode::B, ModifierFlag::MOD</autogen>

五、载入文件

六、为F1、F2、……F9 设置快捷键

请参考[http://www.macx.cn/thread-2138732-1-1.html]

<autogen>__KeyToKey__ KeyCode::F7,  KeyCode::D, ModifierFlag::COMMAND_L, ModifierFlag::OPTION_L</autogen>

请参考 [http://wenku.baidu.com/view/b4bbd0188e9951e79a892732.html]

七、其他

特殊情况下,设置键盘快捷键会出现问题,运行以下命令可修复:
rm ~/Library/Preferences/com.apple.symbolichotkeys.plist

<?xml version="1.0"?>
<root>
    <devicevendordef>
        <vendorname>Logitech</vendorname>
        <vendorid>0x046d</vendorid>
    </devicevendordef>

    <deviceproductdef>
        <productname>USB Receiver</productname>
        <productid>0xc52b</productid>
    </deviceproductdef>

    <item>
        <name>Logictech</name>
        <identifier>private.deviceproductdef</identifier>
        <device_only>DeviceVendor::Logitech, DeviceProduct::USB Receiver</device_only>
        <identifier>private.remap.pc_to_mac</identifier>
        <autogen>__KeyToKey__ KeyCode::HELP, KeyCode::FN</autogen>
        <!-- <autogen>__KeyToKey__ KeyCode::PC_APPLICATION, KeyCode::FN</autogen> -->
        <autogen>__KeyToKey__ KeyCode::COMMAND_L, KeyCode::OPTION_L</autogen>
        <autogen>__KeyToKey__ KeyCode::COMMAND_R, KeyCode::OPTION_R</autogen>
        <autogen>__KeyToKey__ KeyCode::OPTION_L, KeyCode::COMMAND_L</autogen>
        <autogen>__KeyToKey__ KeyCode::OPTION_R, KeyCode::COMMAND_R</autogen>
   


        <autogen>__KeyToKey__ KeyCode::F1,  KeyCode::F11</autogen>
        <autogen>__KeyToKey__ KeyCode::F2,  KeyCode::F2, ModifierFlag::SHIFT_L, ModifierFlag::COMMAND_L</autogen>
        <autogen>__KeyToKey__ KeyCode::F4,  KeyCode::F4, ModifierFlag::SHIFT_L, ModifierFlag::COMMAND_L</autogen>
        <autogen>__KeyToKey__ KeyCode::F5,  KeyCode::EXPOSE_ALL</autogen>
        <autogen>__KeyToKey__ KeyCode::F6,  KeyCode::F6, ModifierFlag::SHIFT_L, ModifierFlag::COMMAND_L</autogen>
        <autogen>__KeyToKey__ KeyCode::F7,  KeyCode::D, ModifierFlag::COMMAND_L, ModifierFlag::OPTION_L</autogen>
        <!-- <autogen>__KeyToKey__ KeyCode::F8,  ConsumerKeyCode::MUSIC_PLAY</autogen> -->
        <autogen>__KeyToKey__ KeyCode::F9,  ConsumerKeyCode::EJECT, ModifierFlag::CONTROL_L, ModifierFlag::SHIFT_L</autogen>
        <autogen>__KeyToKey__ KeyCode::F10, ConsumerKeyCode::POWER, ModifierFlag::COMMAND_L, ModifierFlag::OPTION_L</autogen>
        <autogen>__KeyToKey__ KeyCode::F11, ConsumerKeyCode::EJECT, ModifierFlag::COMMAND_L, ModifierFlag::OPTION_L</autogen>
        <!-- <autogen>__KeyToKey__ KeyCode::F12, ConsumerKeyCode::VOLUME_UP</autogen> -->

        <autogen>__KeyToKey__ KeyCode::KEYPAD_CLEAR, KeyCode::DELETE, ModifierFlag::COMMAND_L</autogen>
        <autogen>__KeyToKey__ KeyCode::PC_PRINTSCREEN, ConsumerKeyCode::EJECT</autogen>
    </item>
</root>

本文参考:

  1. [键盘] 还在纠结Mac版键盘?试试KeyRemap4MacBook吧![http://www.chiphell.com/thread-678136-1-1.html]
  2. 任意PC键盘映射到MAC键盘的karabiner配置xml文件[http://lonestone.iteye.com/blog/215∏7692]
  3. 官方文档:[https://pqrs.org/osx/karabiner/document.html.en]
上一篇 下一篇

猜你喜欢

热点阅读