From ad0536b55210a6644dc1f9f9c39f0f5eab96207d Mon Sep 17 00:00:00 2001 From: shaddollxz Date: Mon, 1 Jan 2024 23:13:16 +0800 Subject: [PATCH] =?UTF-8?q?feat(mac):=20=E5=92=8C=20win=20=E9=94=AE?= =?UTF-8?q?=E4=BD=8D=E5=AF=B9=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mac/main.edn | 17 +++++++++++++++++ mac/modules/mode-3.edn | 7 ++----- mac/modules/mode-9.edn | 6 +++++- mac/modules/mode-caps.edn | 2 ++ 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/mac/main.edn b/mac/main.edn index 3ff9ee9..29172b4 100644 --- a/mac/main.edn +++ b/mac/main.edn @@ -1,4 +1,21 @@ ;; 这里的配置每个模块都通用(因为最后都会被集成为一个文件) + +;; 辅助键: +;; ! | means mandatory +;; # | means optional +;; C | left_command +;; T | left_control +;; O | left_option +;; S | left_shift +;; F | fn +;; Q | right_command +;; W | right_control +;; E | right_option +;; R | right_shift +;; P | caps_lock +;; !! | mandatory command + control + optional + shift (hyper) +;; ## | optional any + ;; 通过 osascript -e 'id of app "AppName"' 命令获得 app 的标识 {:applications {:browser ["^org\\.mozilla\\.firefox$" "^com\\.google\\.Chrome$" "^com\\.microsoft\\.edgemac$" "^com\\.apple\\.Safari$"] :vscode ["^com\\.microsoft\\.VSCode$"]} diff --git a/mac/modules/mode-3.edn b/mac/modules/mode-3.edn index 08f4bb7..587d0d7 100644 --- a/mac/modules/mode-3.edn +++ b/mac/modules/mode-3.edn @@ -5,17 +5,14 @@ [:i :8 ["three_mode" 1]] ;; 8 [:o :8 ["three_mode" 1]] ;; 8 [:p :9 ["three_mode" 1]] ;; 9 + [:h :0 ["three_mode" 1]] ;; 0 [:j :4 ["three_mode" 1]] ;; 4 - [:h :4 ["three_mode" 1]] ;; 4 [:k :5 ["three_mode" 1]] ;; 5 [:l :6 ["three_mode" 1]] ;; 6 - [:b :1 ["three_mode" 1]] ;; 1 - [:n :2 ["three_mode" 1]] ;; 2 + [:n :1 ["three_mode" 1]] ;; 1 [:m :2 ["three_mode" 1]] ;; 2 [:comma :3 ["three_mode" 1]] ;; 3 [:period :3 ["three_mode" 1]] ;; 3 - [:spacebar :0 ["three_mode" 1]] ;; 0 [:r :!Fdelete_or_backspace ["three_mode" 1]] ;; delete [:q :delete_or_backspace ["three_mode" 1]] ;; backspace - [:1 :delete_or_backspace ["three_mode" 1]] ;; backspace ]} \ No newline at end of file diff --git a/mac/modules/mode-9.edn b/mac/modules/mode-9.edn index 359e479..28a085b 100644 --- a/mac/modules/mode-9.edn +++ b/mac/modules/mode-9.edn @@ -66,4 +66,8 @@ [:c [:!Cc ["nine_mode_sub_space" 0]] ["nine_mode" 1]] [:v [:!Cv ["nine_mode_sub_space" 0]] ["nine_mode" 1]] [:z [:!Cz ["nine_mode_sub_space" 0]] ["nine_mode" 1]] - [:y [:!Cs ["nine_mode_sub_space" 0]] ["nine_mode" 1]]]} \ No newline at end of file + + ;; 展开收起代码块 按住 caps 是展开,不按住是收起 + [:h :!COopen_bracket [:vscode ["nine_mode" 1] ["nine_mode_sub_caps" 0]]] ;; 收起代码块 + [:h :!COclose_bracket [:vscode ["nine_mode" 1] ["nine_mode_sub_caps" 1]]] ;; 展开代码块 + ]} \ No newline at end of file diff --git a/mac/modules/mode-caps.edn b/mac/modules/mode-caps.edn index f6d1677..1c2f1f5 100644 --- a/mac/modules/mode-caps.edn +++ b/mac/modules/mode-caps.edn @@ -15,6 +15,8 @@ ;; vscode 中的场景 [:x :!Thyphen [:vscode ["caps_mode" 1]]] ;; 返回 ctrl + - [:z :!SThyphen [:vscode ["caps_mode" 1]]] ;; 前进 shift + ctrl + - + [:j [:!Ck :!Cleft_arrow] [:vscode ["caps_mode" 1]]] ;; 分栏切换到左侧 + [:l [:!Ck :!Cright_arrow] [:vscode ["caps_mode" 1]]] ;; 分栏切换到右侧 ;; 有标签页的场景 [:c :!Cw ["caps_mode" 1]] ;; 关闭标签页 [:b :!CSt ["caps_mode" 1]] ;; 重新打开标签页