Skip to content

Instantly share code, notes, and snippets.

@confluencepoint
Forked from drhisham-code/karabiner.edn
Created September 17, 2022 12:07
Show Gist options
  • Save confluencepoint/c48a913828155a0ec34b87dd57c5b8e0 to your computer and use it in GitHub Desktop.
Save confluencepoint/c48a913828155a0ec34b87dd57c5b8e0 to your computer and use it in GitHub Desktop.

Revisions

  1. @drhisham-code drhisham-code created this gist Jun 3, 2020.
    30 changes: 30 additions & 0 deletions karabiner.edn
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    {:main [{:des "mb3-layer"
    :rules [
    ;; set the action for double press first
    [{:pkey :button3} [:!Sgrave_accent_and_tilde :slash ] ["mb3-q" 1] ]
    ;; set the variable initializer for single press,longpress and allow pass throw on doublepress ?
    ;;[{:pkey :button3} [["mb3-layer" 1]["mb3-q" 1]{:pkey :button3}] nil
    [{:pkey :button3} [["mb3-layer" 1]["mb3-q" 1]] nil
    {:afterup ["mb3-layer" 0]
    :alone {:pkey :button3}
    :delayed {:invoked ["mb3-q" 0] :canceled ["mb3-q" 0]}
    :held {:key :g :modi :left_command :repeat false}
    :params {:alone 500 :held 1500}
    }]
    ;;set the desired layer remaps
    [:d :!S9 ["mb3-layer" 1]]
    [:f :!S0 ["mb3-layer" 1]]
    [:a [:!Sgrave_accent_and_tilde :slash ] ["mb3-layer" 1]]
    [:s [:period :!S8] ["mb3-layer" 1]]
    ]

    }
    {:des "mb2-layer 2press"
    :rules [
    [{:pkey :button2} [:!Sgrave_accent_and_tilde :slash ] ["mb2-q" 1] ]
    [{:pkey :button2} [["mb2-q" 1] {:pkey :button2}] nil
    {:delayed {:invoked ["mb2-q" 0] :canceled ["mb2-q" 0]} :alone {:pkey :button2}}]
    ]
    }
    ]
    }