Skip to content

Instantly share code, notes, and snippets.

@francoisjacques
Forked from lifez/private.xml
Created September 17, 2024 13:44
Show Gist options
  • Save francoisjacques/6b1f5798ba2225b8f9c51bd6453603c2 to your computer and use it in GitHub Desktop.
Save francoisjacques/6b1f5798ba2225b8f9c51bd6453603c2 to your computer and use it in GitHub Desktop.
Karabiner private.xml for Topre REALFORCE 87U on Mac
<?xml version="1.0"?>
<root>
<item>
<name>For Topre REALFORCE 87 Users</name>
<devicevendordef>
<vendorname>TopreCorporation</vendorname>
<vendorid>0x0853</vendorid>
</devicevendordef>
<item>
<name>Swap F1..F12 and functional keys</name>
<appendix>Make the F1..F12 mimic the mac keyboard,</appendix>
<appendix>map the Screen key to FN,</appendix>
<appendix>and have the F1..F12 keys work with the FN modifier.</appendix>
<identifier>private.deviceproductdef.topre.mac.swap_functional_feature</identifier>
<device_only>DeviceVendor::TopreCorporation</device_only>
<autogen>--KeyToKey-- KeyCode::F1, ModifierFlag::FN, KeyCode::F1</autogen>
<autogen>--KeyToKey-- KeyCode::F2, ModifierFlag::FN, KeyCode::F2</autogen>
<autogen>--KeyToKey-- KeyCode::F3, ModifierFlag::FN, KeyCode::F3</autogen>
<autogen>--KeyToKey-- KeyCode::F4, ModifierFlag::FN, KeyCode::F4</autogen>
<autogen>--KeyToKey-- KeyCode::F5, ModifierFlag::FN, KeyCode::F5</autogen>
<autogen>--KeyToKey-- KeyCode::F6, ModifierFlag::FN, KeyCode::F6</autogen>
<autogen>--KeyToKey-- KeyCode::F7, ModifierFlag::FN, KeyCode::F7</autogen>
<autogen>--KeyToKey-- KeyCode::F8, ModifierFlag::FN, KeyCode::F8</autogen>
<autogen>--KeyToKey-- KeyCode::F9, ModifierFlag::FN, KeyCode::F9</autogen>
<autogen>--KeyToKey-- KeyCode::F10, ModifierFlag::FN, KeyCode::F10</autogen>
<autogen>--KeyToKey-- KeyCode::F11, ModifierFlag::FN, KeyCode::F11</autogen>
<autogen>--KeyToKey-- KeyCode::F12, ModifierFlag::FN, KeyCode::F12</autogen>
<autogen>--KeyToKey-- KeyCode::F1, KeyCode::F14</autogen>
<autogen>--KeyToKey-- KeyCode::F2, KeyCode::F15</autogen>
<autogen>--KeyToKey-- KeyCode::F3, KeyCode::MISSION_CONTROL</autogen>
<autogen>--KeyToKey-- KeyCode::F4, KeyCode::LAUNCHPAD</autogen>
<autogen>--KeyToConsumer-- KeyCode::F7, ConsumerKeyCode::MUSIC_PREV</autogen>
<autogen>--KeyToConsumer-- KeyCode::F8, ConsumerKeyCode::MUSIC_PLAY</autogen>
<autogen>--KeyToConsumer-- KeyCode::F9, ConsumerKeyCode::MUSIC_NEXT</autogen>
<autogen>--KeyToConsumer-- KeyCode::F10, ConsumerKeyCode::VOLUME_MUTE</autogen>
<autogen>--KeyToConsumer-- KeyCode::F11, ConsumerKeyCode::VOLUME_DOWN</autogen>
<autogen>--KeyToConsumer-- KeyCode::F12, ConsumerKeyCode::VOLUME_UP</autogen>
<autogen>--KeyToKey-- KeyCode::F13, KeyCode::FN</autogen>
</item>
<item>
<name>Map Realforce Numlock to OSX Numlock</name>
<identifier>private.deviceproductdef.topre.mac.pc_numlock_to_mac_numlock</identifier>
<device_only>DeviceVendor::TopreCorporation</device_only>
<autogen>__KeyToKey__ KeyCode::KEYPAD_CLEAR, KeyCode::VK_IOHIKEYBOARD_TOGGLE_NUMLOCK</autogen>
</item>
<item>
<name>Fix Home/End keys</name>
<identifier>private.deviceproductdef.topre.mac.home_end</identifier>
<device_only>DeviceVendor::TopreCorporation</device_only>
<autogen>--KeyToKey-- KeyCode::HOME, KeyCode::CURSOR_LEFT, VK_COMMAND</autogen>
<autogen>--KeyToKey-- KeyCode::END, KeyCode::CURSOR_RIGHT, VK_COMMAND</autogen>
</item>
<item>
<name>Swap Command and Option keys</name>
<identifier>private.deviceproductdef.topre.swap_command_option</identifier>
<device_only>DeviceVendor::TopreCorporation</device_only>
<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>
</item>
<item>
<name>Map the Application key to CTRL+SPACE combo</name>
<identifier>private.deviceproductdef.topre.map_app</identifier>
<device_only>DeviceVendor::TopreCorporation</device_only>
<autogen>--KeyToKey-- KeyCode::PC_APPLICATION, KeyCode::SPACE, ModifierFlag::CONTROL_L</autogen>
</item>
<item>
<name>Map Pause to Power</name>
<identifier>private.deviceproductdef.topre.map_pause_power</identifier>
<device_only>DeviceVendor::TopreCorporation</device_only>
<autogen>--KeyToKey-- KeyCode::PC_PAUSE, KeyCode::VK_IOHIDPOSTEVENT_NX_POWER_KEY</autogen>
</item>
</item>
</root>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment