Skip to content

Instantly share code, notes, and snippets.

@drhisham-code
Created June 3, 2020 00:45
Show Gist options
  • Save drhisham-code/12f3b1e55ec30d5a996caddf54b9fd26 to your computer and use it in GitHub Desktop.
Save drhisham-code/12f3b1e55ec30d5a996caddf54b9fd26 to your computer and use it in GitHub Desktop.
mouse key rmap for double press and layer
{: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 and allow pass throw?
[{:pkey :button3} [["mb3-layer" 1]["mb3-q" 1]{:pkey :button3}] nil
{:afterup ["mb3-layer" 0]
:alone {:pkey :button3}
:delayed {:invoked ["mb3-q" 0] :canceled ["mb3-q" 0]}
}]
;;set the desired 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