my documentation - hope it help someone #1286
gNosTic-XXX
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
`#================ Double click left mouse button
key(BTN_LEFT).wait(100).key(BTN_LEFT)
#================ Toggle hold LMB
set(keyL, BTN_LEFT).
if_eq($toggle, 1,
set(toggle, 0). #required line!!!
key_up($keyL)
,
set(toggle, 1). #required line!!!
key_down($keyL)
)
`
`#================ 1x tap + hold
#====== V1:
if_tap(k(b), k(c))
#====== V2:
if_tap( #↓↓↓↓ 1x click
k(a)
, #↓↓↓↓↓↓↓↓ hold
k(b)
)
#================ 1x tap + 2x tap
#====== V1:
if_tap(if_tap(k(b), k(a)))
#====== V2:
if_tap(
if_tap( #↓↓↓↓ 2x click
k(a)
, #↓↓↓↓↓↓↓ 1x click
k(b)
)
)
#================ 1x tap + 2x tap + hold ("a" taped 1x, "b" taped 2x, "c" holded)
#====== V1:
if_tap(if_tap(k(b), k(a)), k(c))
#====== V2:
if_tap(
if_tap( #↓↓↓↓ 2x click
k(a)
, #↓↓↓↓↓↓↓↓ 1x click
k(b)
), #↓↓↓↓↓↓↓↓ hold
k(c)
)
#================ 1x tap + 2x tap + 3x tap + hold ("a" taped 1x, "b" taped 2x, "c" taped 3x, "d" holded)
#====== V1:
if_tap(if_tap(if_tap(k(c), k(b)), k(a)), k(d))
#====== V2:
if_tap(
if_tap(
if_tap( #↓↓↓↓↓ 3x click
k(c)
, #↓↓↓↓↓↓↓↓↓ 2x click
k(b)
), #↓↓↓↓↓↓↓↓↓↓ 1x click
k(a)
), #↓↓↓↓↓↓↓↓↓↓↓↓ hold
k(d)
)`
`
#================ Toggle press key
#====== V1:
if_eq($toggle, 1, set(toggle, 0).key(a), set(toggle, 1).key(b))
#====== V2:
if_eq($toggle, 1,
set(toggle, 0). #required line!!!
key(a)
,
set(toggle, 1). #required line!!!
key(b)
)
#================ Toggle hold key
set(HoldKey, BTN_LEFT).
if_eq($toggle, 1,
set(toggle, 0). #required line!!!
key_up($HoldKey)
,
set(toggle, 1). #required line!!!
key_down($HoldKey)
)`
`#================ key combo 1
set(combo, 1).h(space).set(combo, 0)
if_eq($combo, 1, h(a), h(BTN_MIDDLE))
#================ key combo 2
#= modifier key
set(original, space) # this key will be used if nothing else is pressed
set(combo, 1).h($original).set(combo, 0)
#= combo key
if_eq($combo, 1,
#↓↓↓↓ combo key held
hold_keys(BTN_RIGHT)
,
#↓↓↓↓ combo key not held
hold_keys(BTN_LEFT)
)`
`#====== macro switcher (multiple keys)
set(switch, 0).
set(switch, 1).
set(switch, 2).
set(switch, 3).
#====== macro switcher (for 1 key)
if_tap(
if_tap(
if_tap( #↓↓↓↓↓ 3x click
set(switch, 3)
, #↓↓↓↓↓↓↓↓↓ 2x click
set(switch, 2)
), #↓↓↓↓↓↓↓↓↓↓ 1x click
set(switch, 1)
), #↓↓↓↓↓↓↓↓↓↓↓↓ hold
set(switch, 0)
)
#====== macro it self
if_eq($switch, 1,
#↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ macro 1
h(macro)
,
if_eq($switch, 2,
#↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ macro 2
h(macro)
,
if_eq($switch, 3,
#↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ macro 3
h(macro)
,
#↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ macro ELSE
h(macro)
)
)
)
`
All reactions