Skip to content

Instantly share code, notes, and snippets.

@ShingoFukuyama
Last active August 29, 2015 13:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ShingoFukuyama/9127232 to your computer and use it in GitHub Desktop.
Save ShingoFukuyama/9127232 to your computer and use it in GitHub Desktop.
Pretend return key as control_r key. http://fukuyama.co/return-to-right-control
<?xml version="1.0"?>
<root>
<item>
<name>Change Return Key R</name>
<item>
<name>Return to Command_R</name>
<identifier>remap.return2commandR</identifier>
<autogen>__KeyToKey__ KeyCode::RETURN, KeyCode::COMMAND_R</autogen>
</item>
<item>
<name>Return to Control_R</name>
<appendix>(+ When you type Return only, send Return)</appendix>
<identifier>remap.return2controlR_return</identifier>
<autogen>__KeyOverlaidModifier__ KeyCode::RETURN, KeyCode::CONTROL_R, KeyCode::RETURN</autogen>
</item>
<item>
<name>Return to Control_R</name>
<appendix>(+ When you type Return only, send Return) + [KeyRepeat]</appendix>
<identifier>remap.return2controlR_return_keyrepeat</identifier>
<autogen>__KeyOverlaidModifierWithRepeat__ KeyCode::RETURN, KeyCode::CONTROL_R, KeyCode::RETURN</autogen>
</item>
<item>
<name>Return to Option_R</name>
<identifier>remap.return2optionR</identifier>
<autogen>__KeyToKey__ KeyCode::RETURN, KeyCode::OPTION_R</autogen>
</item>
<item>
<name>Option_R to Return</name>
<identifier>remap.optionRreturn2</identifier>
<autogen>__KeyToKey__ KeyCode::OPTION_R, KeyCode::RETURN</autogen>
</item>
<item>
<name>Return to Option_R</name>
<appendix>(+ When you type Return only, send Escape)</appendix>
<identifier>remap.return2optionR_escape</identifier>
<autogen>__KeyOverlaidModifier__ KeyCode::RETURN, KeyCode::OPTION_R, KeyCode::ESCAPE</autogen>
</item>
<item>
<name>Fn+Return to Option_R</name>
<identifier>remap.fnReturn2optionR</identifier>
<autogen>__KeyToKey__ KeyCode::RETURN, ModifierFlag::FN, KeyCode::OPTION_R</autogen>
</item>
<item>
<name>Return to Control_R+F4 (= Move focus to the active (or next) window)</name>
<identifier>remap.return2controlRf4</identifier>
<autogen>__KeyToKey__ KeyCode::RETURN, KeyCode::F4, ModifierFlag::CONTROL_R</autogen>
</item>
<item>
<name>Fn+Return to Shift_R+Insert</name>
<identifier>remap.fnReturn2shiftRinsert</identifier>
<autogen>__KeyToKey__ KeyCode::RETURN, ModifierFlag::FN, KeyCode::PC_INSERT, ModifierFlag::SHIFT_R</autogen>
</item>
</item>
</root>
@ShingoFukuyama
Copy link
Author

Emacs config

(global-unset-key (kbd "RET"))
(setq ns-right-control-modifier 'meta)
;; meta, alt, control, super, hyper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment