Commit 2251f1a 1 parent 5514817 commit 2251f1a Copy full SHA for 2251f1a
File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,8 @@ Here's a full list of events handled by this library:
150
150
151
151
| Attach Function | Description |
152
152
| ----------------------- | ------------------------------------------------------------- |
153
- | `attachClick` | Fires as soon as a single click is detected. |
153
+ | `attachPress` | Fires as soon as a press is detected. |
154
+ | `attachClick` | Fires as soon as a single click press and release is detected.|
154
155
| `attachDoubleClick` | Fires as soon as a double click is detected. |
155
156
| `attachMultiClick` | Fires as soon as multiple clicks have been detected. |
156
157
| `attachLongPressStart` | Fires as soon as the button is held down for 800 milliseconds.|
@@ -175,12 +176,16 @@ This is because a single click callback must not to be triggered in case of a do
175
176
| `setPressMs(int)` | `800 msec` | Duration to hold a button to trigger a long press. |
176
177
177
178
You may change these default values but be aware that when you specify too short times
178
- it is hard to click twice or you will create a press instead of a click.
179
+ it is hard to click twice or you will create a long press instead of a click.
179
180
180
181
The former functions `setDebounceTicks`, `setClickTicks` and `setPressTicks` are marked deprecated.
181
182
The term `Ticks` in these functions where confusing. Replace them with the ...Ms function calls.
182
183
There is no functional change on them.
183
184
185
+ Set debounce ms to a negative value to only debounce on release. `setDebounceMs(-25);` will immediately
186
+ update to a pressed state, and will debounce for 25ms going into the released state. This will expidite
187
+ the `attachPress` callback function to run instantly.
188
+
184
189
185
190
### Additional Functions
186
191
You can’t perform that action at this time.
0 commit comments