Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
single tap right shift to simulate command + space to select previous input method, however holding right shift still remain the modifier key.
<?xml version="1.0"?>
<root>
<inputsourcedef>
<name>MY_CHINESE</name>
<inputsourceid_prefix>
com.apple.inputmethod.SCIM.ITABC
</inputsourceid_prefix>
</inputsourcedef>
<inputsourcedef>
<name>MY_ENGLISH</name>
<inputsourceid_prefix>
com.apple.keylayout.US
</inputsourceid_prefix>
</inputsourcedef>
<vkchangeinputsourcedef>
<name>KeyCode::VK_CHANGE_INPUTSOURCE_MY_CHINESE</name>
<inputsourceid_equal>
com.apple.inputmethod.SCIM.ITABC
</inputsourceid_equal>
</vkchangeinputsourcedef>
<vkchangeinputsourcedef>
<name>KeyCode::VK_CHANGE_INPUTSOURCE_MY_ENGLISH</name>
<inputsourceid_equal>
com.apple.keylayout.US
</inputsourceid_equal>
</vkchangeinputsourcedef>
<item>
<name>Change Input from English to Chinese by Tapping SHIFT_R</name>
<identifier>private.inputEngToChs</identifier>
<inputsource_only>MY_ENGLISH</inputsource_only>
<autogen>
__KeyOverlaidModifier__
KeyCode::SHIFT_R, ModifierFlag::SHIFT_R | ModifierFlag::NONE,
KeyCode::SHIFT_R,
KeyCode::SPACE, ModifierFlag::COMMAND_L | ModifierFlag::NONE
</autogen>
</item>
<item>
<name>Change Input from Chinese to English by Tapping SHIFT_R</name>
<identifier>private.inputChsToEng</identifier>
<inputsource_only>MY_CHINESE</inputsource_only>
<autogen>
__KeyOverlaidModifier__
KeyCode::SHIFT_R, ModifierFlag::SHIFT_R | ModifierFlag::NONE,
KeyCode::SHIFT_R,
KeyCode::SPACE, ModifierFlag::COMMAND_L | ModifierFlag::NONE
</autogen>
</item>
</root>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.