环境:mac
软件:Karabiner
配置文件
路径:/Users/whuanghkl/Library/Application Support/Karabiner/private.xml
内容:
F19 to F19
(F19 to Hyper (ctrl+shift+cmd+opt相当于“⇧⌃⌥⌘”) + F19 Only, send escape)
private.f192f19_escape
--KeyOverlaidModifier--
KeyCode::F19,
KeyCode::COMMAND_L,
ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L,
KeyCode::ESCAPE
OPTION_R to HOME
(OPTION_R Only, send HOME)
private.option_r2home
--KeyOverlaidModifier--
KeyCode::OPTION_R,
KeyCode::OPTION_R,
KeyCode::HOME
COMMAND_L to COMMAND_L+B
(COMMAND_L Only, send COMMAND+B,refresh browser)
private.command_l_only2command_and_b
--KeyOverlaidModifier--
KeyCode::COMMAND_L,
KeyCode::COMMAND_L,
KeyCode::B, ModifierFlag::COMMAND_L
CONTROL_L to TAB+COMMAND_L
(CONTROL_L Only, send TAB+COMMAND_L)
private.command_l2tab_command
--KeyOverlaidModifier--
KeyCode::CONTROL_L,
KeyCode::CONTROL_L,
KeyCode::TAB, ModifierFlag::COMMAND_L
OPTION_L to PAGEUP
(OPTION_L Only, send PAGEUP)
private.option_l2pageup
--KeyOverlaidModifier--
KeyCode::OPTION_L,
KeyCode::OPTION_L,
KeyCode::PAGEUP
COMMAND_R to F17
(COMMAND_R Only, send F17)
private.command_r_only2f17
--KeyOverlaidModifier--
KeyCode::COMMAND_R,
KeyCode::COMMAND_R,
KeyCode::F17
Hyper J to Down
(Hyper-J to Down arrow)
private.hyper-j-down
--KeyToKey--
KeyCode::J,
ModifierFlag::COMMAND_L | ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L,
KeyCode::CURSOR_DOWN
Hyper K to Up
(Hyper-K to Up arrow)
private.hyper-K-up
--KeyToKey--
KeyCode::K,
ModifierFlag::COMMAND_L | ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L,
KeyCode::CURSOR_UP
Hyper H to Left
(Hyper-H to Left arrow)
private.hyper-h-left
--KeyToKey--
KeyCode::H,
ModifierFlag::COMMAND_L | ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L,
KeyCode::CURSOR_LEFT
Hyper L to Right
(Hyper-L to Right arrow)
private.hyper-l-right
--KeyToKey--
KeyCode::L,
ModifierFlag::COMMAND_L | ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L,
KeyCode::CURSOR_RIGHT
Hyper N to Beginning of Line
(Hyper-N to Beginning of Line)
private.hyper-n-beginning-of-line
--KeyToKey--
KeyCode::N,
ModifierFlag::COMMAND_L | ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L,
KeyCode::CURSOR_LEFT,
ModifierFlag::COMMAND_L
Hyper ; to End of Line
(Hyper-; to End of Line)
private.hyper-;-end-of-line
--KeyToKey--
KeyCode::SEMICOLON,
ModifierFlag::COMMAND_L | ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L,
KeyCode::CURSOR_RIGHT,
ModifierFlag::COMMAND_L
Hyper I to Top
(Hyper-I to Top)
private.hyper-i-top
--KeyToKey--
KeyCode::I,
ModifierFlag::COMMAND_L | ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L,
KeyCode::CURSOR_UP,
ModifierFlag::COMMAND_L
Hyper M to Bottom
(Hyper-M to Bottom)
private.hyper-m-bottom
--KeyToKey--
KeyCode::M,
ModifierFlag::COMMAND_L | ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L,
KeyCode::CURSOR_DOWN,
ModifierFlag::COMMAND_L
Hyper + Space To Capslock
Hyper(cmd+ctrl+shift+opt)+space, send Capslock
private.hyperspace2Capslock
--KeyToKey--
KeyCode::SPACE, ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L | ModifierFlag::COMMAND_L,
KeyCode::CAPSLOCK
Change SHIFT_R Key to END
private.shift_r_to_end2
__KeyOverlaidModifier__ KeyCode::SHIFT_R,KeyCode::SHIFT_R, KeyCode::END
Change SHIFT_L Key to (
private.shift_left_to_samll_brackets
__KeyOverlaidModifier__ KeyCode::SHIFT_L,
KeyCode::SHIFT_L,
KeyCode::9, ModifierFlag::SHIFT_L
Change Fn Key to F18
private.fn_to_f182
__KeyOverlaidModifier__ KeyCode::FN, KeyCode::FN,KeyCode::F18
说明:
1,把大小写切换键Capslock 映射成为 escape.
把原来的 escape 映射成为F13(使用工具seil)
F13 用于 IDEA 中的 commit
2,把左边的 command 映射成为F17
右边的command,单独按下相当于F17,用于触发Alfred
参考:
https://www.zhihu.com/question/27158546