Created
January 25, 2010 14:19
-
-
Save hokaccha/285888 to your computer and use it in GitHub Desktop.
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
diff -cr KeyRemap4MacBook-5.1.0/files/prefpane/checkbox.xml KeyRemap4MacBook-5.1.0.new/files/prefpane/checkbox.xml | |
*** KeyRemap4MacBook-5.1.0/files/prefpane/checkbox.xml 2010-01-25 23:05:49.000000000 +0900 | |
--- KeyRemap4MacBook-5.1.0.new/files/prefpane/checkbox.xml 2010-01-25 22:59:20.000000000 +0900 | |
*************** | |
*** 1018,1023 **** | |
--- 1018,1027 ---- | |
<name>Remap Command_L to Option_L</name> | |
<sysctl>remap.app_term_commandL2optionL</sysctl> | |
</item> | |
+ <item> | |
+ <name>Remap Command_R to Option_L</name> | |
+ <sysctl>remap.app_term_commandR2optionL</sysctl> | |
+ </item> | |
</list> | |
</item> | |
</list> | |
diff -cr KeyRemap4MacBook-5.1.0/files/share/reset KeyRemap4MacBook-5.1.0.new/files/share/reset | |
*** KeyRemap4MacBook-5.1.0/files/share/reset 2010-01-25 23:05:49.000000000 +0900 | |
--- KeyRemap4MacBook-5.1.0.new/files/share/reset 2010-01-25 22:59:20.000000000 +0900 | |
*************** | |
*** 182,187 **** | |
--- 182,188 ---- | |
remap.app_vm_commandspace2optionbackquote 0 | |
remap.app_finder_return2commandO 0 | |
remap.app_term_commandL2optionL 0 | |
+ remap.app_term_commandR2optionL 0 | |
remap.qwerty2colemak 0 | |
remap.pc_application2commandL 0 | |
remap.pc_application2controlL 0 | |
diff -cr KeyRemap4MacBook-5.1.0/src/core/kext/remap.cpp KeyRemap4MacBook-5.1.0.new/src/core/kext/remap.cpp | |
*** KeyRemap4MacBook-5.1.0/src/core/kext/remap.cpp 2010-01-25 23:05:49.000000000 +0900 | |
--- KeyRemap4MacBook-5.1.0.new/src/core/kext/remap.cpp 2010-01-25 22:59:21.000000000 +0900 | |
*************** | |
*** 1862,1867 **** | |
--- 1862,1887 ---- | |
} | |
} | |
+ void | |
+ remap_app_term_commandR2optionL(const RemapParams ¶ms) | |
+ { | |
+ if (! config.remap_app_term_commandR2optionL) return; | |
+ | |
+ if (! (params.activeApplicationInfo)->is_terminal) return; | |
+ | |
+ if (*(params.key) == KeyCode::COMMAND_R) { | |
+ unsigned int flags = allFlagStatus.makeFlags(params); | |
+ if (RemapUtil::isModifierOn(flags, ModifierFlag::COMMAND_R)) { | |
+ allFlagStatus.optionL.increase(); | |
+ allFlagStatus.commandR.decrease(); | |
+ } else { | |
+ allFlagStatus.optionL.decrease(); | |
+ allFlagStatus.commandR.increase(); | |
+ } | |
+ *(params.key) = KeyCode::OPTION_L; | |
+ } | |
+ } | |
+ | |
// ---------------------------------------- | |
void | |
remap_qwerty2colemak(const RemapParams ¶ms) | |
*************** | |
*** 2748,2753 **** | |
--- 2768,2774 ---- | |
// *** Note: we need to call remap_app_term_commandL2optionL as possible late. *** | |
// *** If any *2commandL remappings is enable, remap_app_term_commandL2optionL needs to handle it *** | |
remap_app_term_commandL2optionL(params); | |
+ remap_app_term_commandR2optionL(params); | |
// ------------------------------------------------------------ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment