{ :devices {:adv2 [{:vendor_id 10730 :product_id 258}] :pedals [{:vendor_id 10730 :product_id 256}] :volumer [{:vendor_id 16701 :product_id 21818 :location_id 51380224}]} :profiles {:Default {:default true :alone 350 :delay 500 :held 1500 :sim 50}} :applications {:keykey ["^com\\.chekazuja\\.keykey$"] :arc ["^company\\.thebrowser\\.Browser$"] :kitty ["^net\\.kovidgoyal\\.kitty$"] :wezterm ["^com.github.wez.wezterm$"] :ghostty ["^com.mitchellh.ghostty$"] :webapp ["^com\\.apple\\.Safari\\.WebApp\\..+$"] :perplexity ["^ai\\.perplexity\\.mac$"] :gemini ["^com\\.apple\\.Safari\\.WebApp\\.1550A740-0D4C-4C62-BA9B-438AA340471C$"] :copilot ["^com\\.apple\\.Safari\\.WebApp\\.8693C89E-9B7E-4E3D-A8E1-C2EB22E28784$"] :webui ["^com\\.apple\\.Safari\\.WebApp\\.2455BCD9-4CA6-415F-80D8-2FA98F05FC97$"] :openai ["^com\\.Unite\\.openai$"] :chatgpt["^com.openai.chat$"] :librechat ["^com\\.Unite\\.LibreChat$"] :claude ["^com\\.Unite\\.Claude$"] :hepta ["^app.projectmeta.projectmeta$"] :youcom ["^com\\.Unite\\.You$"] :metaai ["^com\\.Unite\\.Meta.ai$"] :wiki ["^com\\.Unite\\.SetiaWiki$"] :jupyter ["^org\\.jupyter\\.jupyterlab-desktop$"] :dataspell ["^com\\.jetbrains\\.dataspell$"] :vikunja ["^com\\.Unite\\.Vikunja$"] :tana ["^inc\\.tana\\.desktop$"] :gfn ["^com\\.nvidia\\.gfnpc\\.mall$"] :moonlight ["^com\\.moonlight-stream\\.Moonlight$"] :rdp ["^com\\.microsoft\\.rdc$"]} :input-sources {:en {:language "en"} :ru {:language "ru"}} :templates {:open "open -a '%s'"} :froms { :left_pedal {:key :f18} :middle_pedal {:key :f19} :right_pedal {:key :f20} } :main [ {:des "pedals default" :rules [:pedals [:left_pedal :!Tleft_command] [:right_pedal :!TSleft_option] [:middle_pedal :ru nil {:afterdown :ru :afterup :en}] ]} {:des "volumer experiment" :rules [:volumer [:volume_up :a nil]]} {:des "Backslash<->Open_Bracket on Advantage2" :rules [:adv2 [:open_bracket :!R5 [:ru :keykey]] [:##open_bracket :!R8 [:ru :keykey]] [:##open_bracket :backslash [:ru :!keykey]] [:##backslash :open_bracket :ru]]} {:des "Delete->Control on Advantage2" :rules [:adv2 [:##delete_forward :left_control] [:##equal_sign :grave_accent_and_tilde :ru] [:##grave_accent_and_tilde :equal_sign :ru]]} {:des "+ <-> ~ on advantage" :rules [:adv2 [:!Requal_sign :!Rgrave_accent_and_tilde :en] [:!Rgrave_accent_and_tilde :non_us_backslash :en] [:non_us_backslash :!Sequal_sign]]} {:des "Alternative language switches: Lcmd->English, Rcmd->Russian, Rshift-> Russian" :rules [:!moonlight [:left_command :left_command nil {:alone {:input :en}}] [:right_command :right_command nil {:alone {:input :ru}}] ;; [:right_shift :right_shift nil {:alone {:input :ru}}] [:!Qt [:!Qt {:input :en}]] [:!Ql [:!Ql {:input :en}]] [:!Ct [:!Ct {:input :en}]] [:!Cl [:!Cl {:input :en}]] ;; [:!Ctab [:!Ctab {:input :en}]] ]} {:des "Caps switches languages" :rules [:!moonlight [:##caps_lock ["capskey" 1] :ru {:alone {:input :en} :afterup ["capskey" 0]}] [:##caps_lock ["capskey" 1] :en {:alone {:input :ru} :afterup ["capskey" 0]}] ]} {:des "Caps switches languages" :rules [:moonlight [:##caps_lock :!Cspacebar] [:##caps_lock :!Cspacebar] [:right_control :right_command] [:left_command :left_control] [:right_command :right_control] ]} {:des "Tab as Hyper(⌘+⌥+^+⇧)" :rules [:capskey [:tab :!!Sleft_command]]} {:des "⌘W->⌘H in Tana" :rules [:tana [:!Cw :!Ch]]} {:des "Caps+↑, Caps+↓ to Control+Opt+arrow" :rules [[:up_arrow :!QESup_arrow :capskey] [:down_arrow :!QESdown_arrow :capskey] [:1 :!QE1 :capskey] [:2 :!QE2 :capskey] [:4 :!!4 :capskey] [:x :!TFf :capskey] [:c :!TFc :capskey] [:n :!!n :capskey] [:!S1 :!QES1 :capskey] [:!S2 :!QES2 :capskey] [:!Sup_arrow :!QESm :capskey] [:!Sdown_arrow :!QESn :capskey] [:3 :!QE3 :capskey] [:5 :!TS5 :capskey] [:equal_sign :!QEequal_sign :capskey] [:##left_arrow :!!1 :capskey] [:##right_arrow :!!2 :capskey]]} {:des "Caps+T to start Kitty, Caps+B->Bing, Caps+G->Bard, Caps+O->Poe, Caps+P->ChatGPT4, Caps+␣->AllGPT" :rules [:capskey [:k [[:open "/Applications/kitty.app"] {:input :en}] :!kitty] [:k [:!Ct {:input :en}] :kitty] [:r [[:open "/Applications/Ghostty.app"] {:input :en}] :!ghostty] [:r :!Ct :ghostty] [:t [:open "/Applications/Tana.app"] :!tana] [:t :!Ch :tana] [:h [:open "/Applications/Heptabase.app"] :!hepta] [:h :!Ch :hepta] [:w [:open "/Applications/Setia Wiki.app"] :!wiki] [:w :!Cw :wiki] [:open_bracket [:open "/Applications/ChatGPT.app"] :!chatgpt] [:open_bracket :!Cw :chatgpt] [:p :!!p] [:i [:open "/Applications/Perplexity.app"] :!perplexity] [:i :!Ch :perplexity] [:l [:open "/Applications/LibreChat.app"] :!librechat] [:l :!Ch :librechat] ; [:j [:open "/Applications/JupyterLab.app"] :!jupyter] ; [:j :!Ch :jupyter] [:v [:open "/Applications/Vikunja.app"] :!vikunja] [:v :!Ch :vikunja] ]} {:des "⌘W->⌘H in Heptabase" :rules [:hepta [:!Cw :!Ch]]} {:des "opt-W->⌘H" :rules [[:!Ow :!Ch]]} {:des "⌘W->⌘H in Safari ChatGPT app" :rules [:webapp [:!Cw :!Ch]]} {:des "Ropt->Comma" :rules [[:##right_option :right_shift :ru {:alone :!R6}] [:##right_option :right_shift :en {:alone :comma}]]} {:des "Rshift->Comma" :rules [[:##right_shift :right_shift :ru {:alone :!R6 :held :caps_lock}] [:##right_shift :right_shift :en {:alone :comma :held :caps_lock}]]} {:des "Lshift->Plus" :rules [[:##left_shift :left_shift nil {:alone :!Sequal_sign}]]} {:des "Rcommand -> comma, but not on advantage" :rules [[:##right_command :right_command [:ru :!adv2] {:alone :!R6}]]}] } ;; this is a little bit weird, but it's convenient ;; the rule [:!Ca :!T1] ;; means from command a to control 1 ;; :!Ca is keycode :a and prefix a with !C ;; here's the definition ;; ! | 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