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.
mouse karabiner
{: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}}]
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment