在這邊要修改的鍵盤是Logitech K811,參考了An Idyll Place的文章《Keymapping on Yosemite for your Keyboard with Karabiner》,以下是想要改的部分:
- 顯示桌面:組合鍵 Cmd+F4
- 顯示Dashboard:組合鍵 Cmd+F5
- 讓螢幕調亮可以使用
- 讓螢幕調暗可以使用
由於想要改的部分都不在預先設定的內容中,所以就必須要自行修改private.xml這個檔案:
<?xml version="1.0"?>
<root>
<item>
<name>Logitech K811 Show Desktop</name>
<appendix>Add show desktop to command F4/Expose</appendix>
<identifier>private.comand_mc_to_show_desktop</identifier>
<autogen>--KeyToConsumer-- KeyCode::RawValue::0x00a0, ModifierFlag::CONTROL_L | ModifierFlag::COMMAND_L, KeyCode::F11, ModifierFlag::NONE</autogen>
</item>
<item>
<name>Logitech K811 Mission Control</name>
<appendix>Add mission control to command F5/Dashboard</appendix>
<identifier>private.command_dash_to_mission_control</identifier>
<autogen>--KeyToConsumer-- KeyCode::RawValue::0x0083, ModifierFlag::COMMAND_L | ModifierFlag::COMMAND_L, KeyCode::F12, ModifierFlag::NONE</autogen>
</item>
<item>
<name>Logitech K811 Brightness Up</name>
<appendix>Enable Keyboard Brightness Up</appendix>
<identifier>private.enable_brightnessUp</identifier>
<autogen>--KeyToConsumer-- KeyCode::F15, ConsumerKeyCode::BRIGHTNESS_UP</autogen>
</item>
<item>
<name>Logitech K811 Brightness Down</name>
<appendix>Enable Keyboard Brightness Down</appendix>
<identifier>private.enable_brightnessDown</identifier>
<autogen>--KeyToConsumer-- KeyCode::F14, ConsumerKeyCode::BRIGHTNESS_DOWN</autogen>
</item>
</root>
這邊都是KeyToConsumer,意思就是某個按鍵對應到一些鍵盤製造商提供的特別功能。按鍵其實還有很多種:
- Key:一般按鍵
- Consumer:廠商提供的特別按鍵
- PointingButton:指向裝置(像是滑鼠的按鍵)
_EOF_
沒有留言:
張貼留言