How to bind a key to press two separate keys
In other words, if I press "x", it registers as me pressing "a" and "b" sequentially.
I run Mac OSX Yosemite 10.10.5. A Karabiner solution eludes me, thus I am researching more.
Solution 1:
To make this work you have to use a third party tool: Karabiner.
- Download, install and open Karabiner
- Open in the menulet Karabiner -> Preferences
- Open the tab Misc & Uninstall
- Hit the button Open private.xml
- Open the file private.xml with an appropriate editor
-
Enter the customized keycode
<?xml version="1.0"?> <root> <item> <name>X to A and B</name> <appendix>When you type X, A and B are written</appendix> <identifier>x2ab</identifier> <autogen>__KeyToKey__ KeyCode::X, KeyCode::A, KeyCode::B</autogen> </item> </root>
Save the file
- Open in the menulet Karabiner -> Preferences the tab Change Key
- Hit the ReloadXML button
- Enable the remapping. It should be listed at the beginning.
You can restrict the keybinding to particular apps if needed by adding additional tags. Leave a comment if you want to know how or specify your question.