Karabiner private.xml for non-Apple keyboard to toggle Target Display Mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<root> | |
<devicevendordef> | |
<vendorname>LOGITECH</vendorname> | |
<vendorid>0x046d</vendorid> | |
</devicevendordef> | |
<deviceproductdef> | |
<productname>LOGITECH_K811</productname> | |
<productid>0xb317</productid> | |
</deviceproductdef> | |
<item> | |
<name>Cmd + F2 to toggle TDM (Logitech_K811)</name> | |
<appendix>Cmd + F2 for Target Display Mode</appendix> | |
<identifier>private.logitch_K811_toggle_TMD</identifier> | |
<!-- Comment the line below to remove restriction to mapping Logitech K811 only --> | |
<device_only>DeviceVendor::LOGITECH, DeviceProduct::LOGITECH_K811</device_only> | |
<!--Target Display Mode--> | |
<autogen>__KeyToKey__ KeyCode::F2, VK_COMMAND, ConsumerKeyCode::BRIGHTNESS_UP, ModifierFlag::COMMAND_L</autogen> | |
<!-- | |
<autogen>__KeyToKey__ KeyCode::F6, VK_COMMAND, ConsumerKeyCode::BRIGHTNESS_DOWN, ModifierFlag::FN</autogen> | |
<autogen>__KeyToKey__ KeyCode::F7, VK_COMMAND, ConsumerKeyCode::BRIGHTNESS_UP, ModifierFlag::FN</autogen> | |
--> | |
</item> | |
<devicevendordef> | |
<vendorname>MADCATZ</vendorname> | |
<vendorid>0x0738</vendorid> | |
</devicevendordef> | |
<deviceproductdef> | |
<productname>MADCATZ_STRIKEM</productname> | |
<productid>0x1114</productid> | |
</deviceproductdef> | |
<item> | |
<name>Cmd + F5 or F6 to adjust Adjust Brightness (Madcatz)</name> | |
<appendix>Cmd + F2 for Target Display Mode - Command F5 or F6 brightness up/down.</appendix> | |
<identifier>private.madcatz_strikem_toggle_TMD</identifier> | |
<!-- Comment the line below to remove restriction to mapping Madcatz Strikem only --> | |
<device_only>DeviceVendor::MADCATZ, DeviceProduct::MADCATZ_STRIKEM</device_only> | |
<!--Target Display Mode--> | |
<autogen>__KeyToKey__ KeyCode::F2, VK_COMMAND, ConsumerKeyCode::BRIGHTNESS_UP, ModifierFlag::COMMAND_L</autogen> | |
<!-- Fn+F1F6,F7 to Brightness Adjust --> | |
<autogen>__KeyToKey__ KeyCode::F6, VK_COMMAND, ConsumerKeyCode::BRIGHTNESS_DOWN, ModifierFlag::FN</autogen> | |
<autogen>__KeyToKey__ KeyCode::F7, VK_COMMAND, ConsumerKeyCode::BRIGHTNESS_UP, ModifierFlag::FN</autogen> | |
</item> | |
</root> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For use with Karabiner App on Mac OS X. In Karabiner app, settings, open EventViewer to get Device ID & Vendor ID for your keyboard, and then use <device_only> in private.xml to limits keyboard remapping to certain keybaords. I find this useful for using _'Target Display Mode'_ on a Mac (with a non Apple Keyboard, like the great _Logitech K811_).