Karabiner:Keyboard remapping in MacOSX

來源:互聯網
上載者:User

標籤:

  本篇介紹MacOSX下鍵位映射軟體Karabiner的配置和使用。

  目錄:

  1.介紹

  2.下載

  3.軟體配置

  4.參考資料

 

1.介紹

  Karabiner前身是KeyRemap4MacBook,是一款免費並且功能強大的鍵位映射工具軟體。內建了很多按鍵映射,可以按照使用者自己的想法定義按鍵效果,同時可以實現一鍵切換映射功能和針對特定情境的映射切換。

2.下載

  為:https://pqrs.org/osx/karabiner/

3.軟體配置

  在Karabiner主介面,已經提供很多按鍵映射方案,可以靈活選擇自己所需要的方案。如下:

 

  同時Karabiner還提供自訂按鍵映射。通過private.xml檔案,使用者可以方便的設計適合自己的按鍵方案。

  

    private.xml中幾個重要的配置項:

  1.devicevendordef:鍵盤的生產廠商;vendorname:自訂名字(唯一);vendorid:廠商編號

  2.deviceproductdef:鍵盤的型號;productname:自訂名字(唯一);vendorid:型號編號

  以上兩項可以在Karabiner->Launch EventViewer->Devices中查看(前提是鍵盤已經接入):

    

  3.item:為配置介面的配置項,如下:

   

  name:介面上顯示的描述

  identifier:標識

  device_only:只有這裡聲明的裝置才會應用我們的配置,如不填,則表示所有裝置通用。

  auto_gen:按鍵映射

 

  參考private.xml如下:

<?xml version="1.0"?><root>    <devicevendordef>        <vendorname>Topre_Corporation</vendorname>        <vendorid>0x0853</vendorid>    </devicevendordef>    <deviceproductdef>        <productname>Realforce_87</productname>        <productid>0x0111</productid>    </deviceproductdef>        <item>        <name>change rf to mac layout</name>        <identifier>rf_mac</identifier>        <device_only>DeviceVendor::Topre_Corporation, DeviceProduct::Realforce_87</device_only>        <autogen>__KeyToKey__ KeyCode::COMMAND_L, KeyCode::OPTION_L</autogen>        <autogen>__KeyToKey__ KeyCode::OPTION_L, KeyCode::COMMAND_L</autogen>        <autogen>__KeyToKey__ KeyCode::OPTION_R, KeyCode::COMMAND_R</autogen>        <autogen>__KeyToKey__ KeyCode::COMMAND_R, KeyCode::OPTION_R</autogen>        <autogen>__KeyToKey__ KeyCode::PC_APPLICATION, KeyCode::FN</autogen>        <autogen>__KeyToKey__ KeyCode::FORWARD_DELETE, KeyCode::DELETE, ModifierFlag::COMMAND_R</autogen>        <autogen>__KeyToKey__ KeyCode::F3, KeyCode::DASHBOARD</autogen>        <autogen>__KeyToKey__ KeyCode::F4, KeyCode::LAUNCHPAD</autogen>    </item></root>

  其他進階配置可以自行查看4中的提供的資料。

4.參考資料

  https://pqrs.org/osx/karabiner/xml.html.en

Karabiner:Keyboard remapping in MacOSX

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.