Skip to content

Instantly share code, notes, and snippets.

@drhisham-code
Created June 3, 2020 01:23
Show Gist options
  • Save drhisham-code/248dc28920ce164e0a03bea54d39af3e to your computer and use it in GitHub Desktop.
Save drhisham-code/248dc28920ce164e0a03bea54d39af3e 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