Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

karabiner multitouch_extension #332

Open
xxleyi opened this issue Aug 28, 2022 · 0 comments
Open

karabiner multitouch_extension #332

xxleyi opened this issue Aug 28, 2022 · 0 comments

Comments

@xxleyi
Copy link
Owner

xxleyi commented Aug 28, 2022

利用 karabiner 的触摸板扩展功能,打造触摸板和按键结合的健壮快捷键。

主要集中在 chrome 和 vscode 中,包括:

  • 切换 tab
  • 新建 tab
  • 关闭当前 tab
{:des "chrome"
         :rules [:chrome
                 [:left_command :left_command nil {:alone [:!Ct]}]
                ;;  [:left_option :left_option nil {:alone ["open simple://scripts/list-chrome-tabs"]}]
                ;;  [:right_option :focus_omnibar]
                ;;  [:left_control :left_option nil {:alone [:!CSt]}]
                ;;  [{:key :right_option :modi :left_command} :!COi]
                ;;  [:-d :open_dev_tools]                 

                 [:condi :chrome ["multitouch_extension_finger_count_total" 1]]

                 [:condi :chrome ["multitouch_extension_finger_count_total" 2]]
                 [:-d :open_dev_tools]
                 [:-a :!CSopen_bracket]
                 [:-s :!CSclose_bracket]
                 [:-x :!Cw]
                 [:-t :!Ct]

                 [:condi :chrome :escape-mode]
                 [:-f :chrome_full_screen]
                ;;  [:grave_accent_and_tilde :a nil {:delayed {:invoked [:y] :canceled [:x]}}]
                 ;
                 ;
                 ]}
        {:des "code-mode" :rules [:code-mode [:-r :rename]]}


        {:des "code"
         :rules [:code
                 [:left_command :left_command nil {:alone :go_to_file}]
                ;;  [:left_option :left_option nil {:alone :focus_terminal}]
                ;;  [:right_option :right_option nil {:alone :command_palette}]
                 [:left_control :left_control nil {:alone :command_palette}]
                 [:right_control :right_control nil {:alone :command_palette}]
                 [:!Cs :replace];


                 [:home :start_debugger]
                 [:end :restart_debugger]

                 [:condi :code :modify-mode]
                 ;view
                 ;note - I try to keep these on my left hand so I can keep my right on the mouse
                 [:condi :code :caps_lock-mode]
                 [:-g :focus_git] ;; SCM
                 [:-e :focus_explorer] ;; Explorer
                 [:-x :focus_explorer] ;; Explorer
                 [:-s :!!s] ;; Status Bar
                ;;  [:-t :focus_terminal]
                ;;  [:-n :new_terminal]
                 [:-f :find_in_project]
                 [:-z [:!Ck :z]] ;zen mode
                 [:-v :!!v]
                 [:-x :!!x]
                 [:-p :!!r] ;toggle panel
                 [:semicolon :!!semicolon]


                ;;  [:left_shift :!Cb]
                 ; [:-a :toggle_sidebar]

                 ;trackpad
                 [:condi :code ["multitouch_extension_finger_count_total" 1]]
                 [:left_command :left_command nil {:alone :start_debugger}]
                ;;  [:left_option :left_option nil {:alone :restart_debugger}]

                 ;trackpad 2
                 [:condi :code ["multitouch_extension_finger_count_total" 2]]
                 [:-a :!CSopen_bracket]
                 [:-s :!CSclose_bracket]
                 [:-x :!Cw]
                 [:-n :!Cn]
                 [:-t :!Cn]


                 ;
                 ]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant