yqrashawn / GokuRakuJoudo

config karabiner with ease
GNU General Public License v3.0
1.2k stars 123 forks source link

How can I add multiple key presses after running a shell script? #233

Open robokonk opened 1 year ago

robokonk commented 1 year ago

This is my config Karabiner.edn file.

{
 :profiles {:Default {:default true
                      :sim 50 ;;
                      :delay 500 ;;
                      :alone 1000 ;;
                      :held 500 ;;
}} 

 :templates {:echo "echo \"%s\""
             :open "open \"%s\""
             :open-app "open -a \"%s\""} ;; templates

 :simlayers {:launch-mode {:key :o}} ;; layers

 :tos {
       :toggle_caps {:key :caps_lock :hold_down_ms 100}}
 :main [
        {:des "launch mode: quick launch applications"
         :rules [:launch-mode 
                 [:b
                     [:open-app "obsidian" [:key :left_command :left_shift :f]]]]}]}

How should I rewrite this element?

  :rules [:launch-mode 
                 [:b
                     [:open-app "obsidian" [:key :left_command :left_shift :f]]]]

I want to open "Obsidian" in the shell. Then, in Karabiner, I need to press three keys: Left Command, Left Shift, and F.