3 QMK supports multiple debounce algorithms through its debounce API.
5 The logic for which debounce method called is below. It checks various defines that you have set in rules.mk
8 DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce
10 ifneq ($(strip $(DEBOUNCE_TYPE)), custom)
11 QUANTUM_SRC += $(DEBOUNCE_DIR)/$(strip $(DEBOUNCE_TYPE)).c
17 | DEBOUNCE_TYPE | Description | What else is needed |
18 | ------------- | --------------------------------------------------- | ----------------------------- |
19 | Not defined | Use the default algorithm, currently sym_g | Nothing |
20 | custom | Use your own debounce.c | ```SRC += debounce.c``` add your own debounce.c and implement necessary functions |
21 | anything_else | Use another algorithm from quantum/debounce/* | Nothing |
23 **Regarding split keyboards**:
24 The debounce code is compatible with split keyboards.
26 # Use your own debouncing code
27 * Set ```DEBOUNCE_TYPE = custom ```.
28 * Add ```SRC += debounce.c```
29 * Add your own ```debounce.c```. Look at current implementations in ```quantum/debounce``` for examples.
30 * Debouncing occurs after every raw matrix scan.
31 * Use num_rows rather than MATRIX_ROWS, so that split keyboards are supported correctly.
33 # Changing between included debouncing methods
34 You can either use your own code, by including your own debounce.c, or switch to another included one.
35 Included debounce methods are:
36 * eager_pr - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE_DELAY``` milliseconds of no further input for that row.
37 For use in keyboards where refreshing ```NUM_KEYS``` 8-bit counters is computationally expensive / low scan rate, and fingers usually only hit one row at a time. This could be
38 appropriate for the ErgoDox models; the matrix is rotated 90°, and hence its "rows" are really columns, and each finger only hits a single "row" at a time in normal use.
39 * eager_pk - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE_DELAY``` milliseconds of no further input for that key
40 * sym_g - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE_DELAY``` milliseconds of no changes has occured, all input changes are pushed.