ruidoBlanco
2023-08-23 08:54:02 +08:00
感謝,很不錯的點子。karabiner 裏面很容易就做到了。
:input-sources {
:en {:input_source_id "^com\\.apple\\.keylayout.*" :language "en"}
:zh {:language "^zh.*"}
:sogou {:input_mode_id "^com\\.sogou\\.inputmethod.*" :language "^zh.*"}
}
{:des "Capslock to hyper (Ctrl+Alt) when held, to ESC when tapped, and switch to English as well if input method is Chinese"
:rules [
[:##caps_lock :!Tleft_option :en {:alone :escape}]
[:##caps_lock :!Tleft_option :zh {:alone [:!Tspacebar :escape]}]
]
}