2019独角兽企业重金招聘Python工程师标准>>> mac 键盘映射优化配置-编程知识网

1,使用 seil 把 space 映射成为回车

mac 键盘映射优化配置-编程知识网

 

2,单独按下 shift 键 映射 成为 space

使用karabiner

<!-- 左边的shift单独按下 映射成为 space  --><item><name>Change SHIFT_L Key to SPACE</name><identifier>private.shift_left_to_SPACE</identifier><autogen>__KeyOverlaidModifier__ KeyCode::SHIFT_L,KeyCode::SHIFT_L,KeyCode::SPACE</autogen></item>

注意:此处只把单独按下映射成为 space, 组合按下时让然是 shift

官网地址:https://pqrs.org/osx/karabiner/xml.html

我自己的private.xml 内容如下:

<?xml version="1.0"?>
<root><item><!-- 单独按下相当于escape.和别的键组合按下, 相当于“⇧⌃⌥⌘” --><name>F19 to F19</name><appendix>(F19 to Hyper (ctrl+shift+cmd+opt相当于“⇧⌃⌥⌘”) + F19 Only, send escape)</appendix><identifier>private.f192f19_escape</identifier><autogen>--KeyOverlaidModifier--KeyCode::F19,KeyCode::COMMAND_L,ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L,KeyCode::ESCAPE</autogen></item><!-- 单独按下右边的Option/Alt 相当于Home  --><item><name>OPTION_R to HOME</name><appendix>(OPTION_R Only, send HOME)</appendix><identifier>private.option_r2home</identifier><autogen>--KeyOverlaidModifier--KeyCode::OPTION_R,KeyCode::OPTION_R,KeyCode::HOME</autogen></item><!-- press command_l only equals "command +B ",to refresh browser --><item><name>COMMAND_L to COMMAND_L+B</name><appendix>(COMMAND_L Only, send COMMAND+B,refresh browser)</appendix><identifier>private.command_l_only2command_and_b</identifier><autogen>--KeyOverlaidModifier--KeyCode::COMMAND_L,KeyCode::CONTROL_L,KeyCode::TAB, ModifierFlag::COMMAND_L</autogen></item><!-- 单独按下F13(即原 escape),打开浏览器调试  --><item><name>F13 to option_command+I</name><appendix>(F13 Only, send COMMAND+OPTION+B,debug browser)</appendix><identifier>private.f13_only2command_option_and_i</identifier><autogen>--KeyOverlaidModifier--KeyCode::F13,KeyCode::F13,KeyCode::I, ModifierFlag::COMMAND_L|ModifierFlag::OPTION_L</autogen></item><item><!-- 左边的control单独按下相当于Tab+command.用来切换窗口  --><name>CONTROL_L to TAB+COMMAND_L</name><appendix>(CONTROL_L Only, send TAB+COMMAND_L)</appendix><identifier>private.command_l2tab_command</identifier><autogen>--KeyOverlaidModifier--KeyCode::CONTROL_L,KeyCode::COMMAND_L,KeyCode::CONTROL_L</autogen></item><item><!-- 左边的Option/Alt,单独按下相当于pageUp,用于IDEA中通过接口路径搜索  --><name>OPTION_L to PAGEUP</name><appendix>(OPTION_L Only, send PAGEUP)</appendix><identifier>private.option_l2pageup</identifier><autogen>--KeyOverlaidModifier--KeyCode::OPTION_L,KeyCode::OPTION_L,KeyCode::T,ModifierFlag::COMMAND_L</autogen></item><item><!--  右边的command,单独按下相当于F17,用于触发Alfred --><name>COMMAND_R to F17</name><appendix>(COMMAND_R Only, send F17)</appendix><identifier>private.command_r_only2f17</identifier><autogen>--KeyOverlaidModifier--KeyCode::COMMAND_R,KeyCode::COMMAND_R,KeyCode::F17</autogen></item><item><!--   --><name>Hyper J to Down</name><appendix>(Hyper-J to Down arrow)</appendix><identifier>private.hyper-j-down</identifier><autogen>--KeyToKey--KeyCode::J,ModifierFlag::COMMAND_L | ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L,KeyCode::CURSOR_DOWN</autogen></item><item><!--   --><name>Hyper K to Up</name><appendix>(Hyper-K to Up arrow)</appendix><identifier>private.hyper-K-up</identifier><autogen>--KeyToKey--KeyCode::K,ModifierFlag::COMMAND_L | ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L,KeyCode::CURSOR_UP</autogen></item><item><!--   --><name>Hyper H to Left</name><appendix>(Hyper-H to Left arrow)</appendix><identifier>private.hyper-h-left</identifier><autogen>--KeyToKey--KeyCode::H,ModifierFlag::COMMAND_L | ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L,KeyCode::CURSOR_LEFT</autogen></item><item><name>Hyper L to Right</name><appendix>(Hyper-L to Right arrow)</appendix><identifier>private.hyper-l-right</identifier><autogen>--KeyToKey--KeyCode::L,ModifierFlag::COMMAND_L | ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L,KeyCode::CURSOR_RIGHT</autogen></item><item><name>Hyper N to Beginning of Line</name><appendix>(Hyper-N to Beginning of Line)</appendix><identifier>private.hyper-n-beginning-of-line</identifier><autogen>--KeyToKey--KeyCode::N,ModifierFlag::COMMAND_L | ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L,KeyCode::CURSOR_LEFT,ModifierFlag::COMMAND_L</autogen></item><item><name>Hyper ; to End of Line</name><appendix>(Hyper-; to End of Line)</appendix><identifier>private.hyper-;-end-of-line</identifier><autogen>--KeyToKey--KeyCode::SEMICOLON,ModifierFlag::COMMAND_L | ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L,KeyCode::CURSOR_RIGHT,ModifierFlag::COMMAND_L</autogen></item><item><name>Hyper I to Top</name><appendix>(Hyper-I to Top)</appendix><identifier>private.hyper-i-top</identifier><autogen>--KeyToKey--KeyCode::I,ModifierFlag::COMMAND_L | ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L,KeyCode::CURSOR_UP,ModifierFlag::COMMAND_L</autogen></item><item><name>Hyper M to Bottom</name><appendix>(Hyper-M to Bottom)</appendix><identifier>private.hyper-m-bottom</identifier><autogen>--KeyToKey--KeyCode::M,ModifierFlag::COMMAND_L | ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L,KeyCode::CURSOR_DOWN,ModifierFlag::COMMAND_L</autogen></item><item><name>Hyper + Space To Capslock</name><appendix>Hyper(cmd+ctrl+shift+opt)+space, send Capslock</appendix><identifier>private.hyperspace2Capslock</identifier><autogen>--KeyToKey--KeyCode::SPACE, ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L | ModifierFlag::COMMAND_L,KeyCode::CAPSLOCK</autogen></item><!-- <item><name>Change Escape to Mission Control</name><identifier>private.escape_to_mission_control</identifier><autogen>--KeyToKey--KeyCode::ESCAPE,KeyCode::CURSOR_UP, ModifierFlag::CONTROL_L</autogen></item>--><!-- 右边的shift 映射成为 shift+command+->, 在 IDEA 中快捷键效果为回到 line end  --><item><name>Change SHIFT_R Key to END</name><identifier>private.shift_r_to_end2</identifier><autogen>__KeyOverlaidModifier__ KeyCode::SHIFT_R,KeyCode::SHIFT_R,KeyCode::B, ModifierFlag::COMMAND_L</autogen></item><!-- 左边的shift单独按下 映射成为 space  --><item><name>Change SHIFT_L Key to SPACE</name><identifier>private.shift_left_to_SPACE</identifier><autogen>__KeyOverlaidModifier__ KeyCode::SHIFT_L,KeyCode::SHIFT_L,KeyCode::SPACE</autogen></item><!-- 左边的option 和回车 映射成为左边的option 和回车+ 左边的 command(多了一个command) ,用于切换浏览器 --><item><name>Change option_left Key to option_left_and_command_left</name><identifier>private.option_left_to_samlla233_command_left</identifier><autogen>__KeyToKey__KeyCode::RETURN, ModifierFlag::OPTION_L,KeyCode::RETURN, ModifierFlag::OPTION_L| ModifierFlag::COMMAND_L</autogen></item><item><!-- F18用于触发 paste  --><name>Change Fn Key to F18</name><identifier>private.fn_to_f182</identifier><autogen>__KeyOverlaidModifier__ KeyCode::FN, KeyCode::FN,KeyCode::F18</autogen></item>
</root>

 

简单来说:

space:回车
左边的shift 映射成为 space
右边的 shift 在浏览器中是刷新浏览器,在 IDEA 中是编译
esc: 在浏览器中是打开调试窗口

转载于:https://my.oschina.net/huangweiindex/blog/1574542