-
Notifications
You must be signed in to change notification settings - Fork 0
BindingList
Finn Biggs edited this page Aug 29, 2023
·
15 revisions
| Binding Name | Format in Config | Usage Details |
|---|---|---|
| noop | ["noop"] | "No operation" Do nothing |
| quick_sleep | ["quick_sleep"] | Cato in sleep mode - tap wake |
| pointer_sleep | ["pointer_sleep"] | Cato in pointer sleep - gesture wake |
| quick_calibrate | ["quick_calibrate"] | Cato runs calibration - drift removal |
| dwell_click | ["dwell_click", BUTTON, CANCEL_THS] | Routine: move cursor, tap <BUTTON> on dwell; Tilt at CANCEL_THS speed to cancel |
| scroll | ["_scroll"] | Routine: freeze cursor, looking up/down causes scroll motion, looking l/r cancels |
| scroll_lr | ["_scroll_lr"] | Routine: freeze cursor, looking up/down causes (horizontal) scroll motion, looking l/r cancels |
| button_action | ["button_action", ACTOR, ACTION, BUTTON] | See Below, also Configuration Guide |
A button action entry in config has the following format: ["button_action", ACTOR, ACTION, BUTTON]
To interpret that, "button_action" is the command to be bound, and the following entries in the list are modifier that determine what action gets taken
replace "ACTOR" with one of:
0 --> mouse
1 --> keyboard
replace "ACTION" with one of:
"tap" -----------------------> quick press and release
"double_tap" ----------------> double (press, release)
"press" ---------------------> press-and-hold
"release" -------------------> release
"toggle" --------------------> press if released, release if held
"hold_until_idle" -----------> holds until user mouse movement triggers idle detection
"hold_until_sig_motion" -----> holds until user mouse movement triggers significant motion detection
Mouse: If ACTOR is 0, then these are the bindings
Left Click = 1
Right Click = 2
Keyboard: However, If Actor is 1, then the bindings are best described by a dedicated list located at an external site
Bindings with gestures is order-based.
Use these gestures to select the corresponding binding entry from your list.
| Gesture | Int Value | Example Bindings | Config Binding Entry |
|---|---|---|---|
| None | 0 | None | ["noop"] |
| Nod Up | 1 | Double Click | ["button_action",0,"double_tap",1] |
| Nod Down | 2 | Left Click | ["button_action",0,"tap",1] |
| Nod Right | 3 | Scroll | ["_scroll"] |
| Nod Left | 4 | Click and Drag | ["button_action",0,"hold_until_idle",1] |
| Tilt Right | 5 | Right Click | ["button_action",0,"tap",2] |
| Tilt Left | 6 | Pointer Sleep | ["pointer_sleep"] |
And to give a complete binding example for gestures:
Sample from a real config.json:
"value" : {
"gesture_mouse" : {
"label" : "Gesture Mouse",
"description" : "Operation loop: Mouse movement -> Idle -> Gesture -> Action",
"access" : "rw",
"value" : [
[ ["noop"] ],
[ ["button_action",0,"double_tap",1] ],
[ ["button_action",0,"tap",1] ],
[ ["button_action",0,"tap",2] ],
[ ["button_action",0,"toggle",1] ],
[ ["dwell_click", 1, 80] ],
[ ["pointer_sleep"] ]
]
}
}
Clicker mode is slightly different. We have set up a method where you can chain together an arbitrary number of taps and bind them how you like
| Number of Taps | Int Value | Example Bindings | Config Binding Entry |
|---|---|---|---|
| None | 0 | None | ["noop"] |
| Single | 1 | Left Click | ["button_action",0,"tap",1] |
| Double | 2 | Double Click | ["button_action",0,"double_tap",1] |
| Triple | 3 | Right Click | ["button_action",0,"tap",2] |
| More? | 4+ | ---- | ---- |
And a functioning example from config.json:
"clicker" : {
"label" : "Clicker",
"description" : "Operation Loop: Click -> multiple click timeout -> Action",
"access" : "rw",
"note" : "available tap combos depend on number of bindings",
"value" : [
[ ["noop"] ],
[ ["button_action",0,"tap",1] ],
[ ["button_action",0,"double_tap", 1] ],
[ ["button_action",0,"tap",2] ]
]
}