]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - keyboards/ergodox_ez/config.h
Adaptive debounce logic
[qmk_firmware.git] / keyboards / ergodox_ez / config.h
index 3dfe8733cb71815fe97b9682c10860e87643500c..ee768853a981c08b277a28545702bea8dfbf0e6c 100644 (file)
@@ -81,24 +81,24 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* fix space cadet rollover issue */
 #define DISABLE_SPACE_CADET_ROLLOVER
 
-// #define RGB_MIDI
 #define RGBW_BB_TWI
 
 #define RGBW 1
 
-/* "debounce" is measured in keyboard scans. Some users reported
- * needing values as high as 15, which was at the time around 50ms.
+/*
+ * The debounce filtering reports a key/switch change directly,
+ * without any extra delay. After that the debounce logic will filter
+ * all further changes, until the key/switch reports the same state for
+ * the given count of scans.
+ * So a perfect switch will get a short debounce period and
+ * a bad key will get a much longer debounce period.
+ * The result is an adaptive debouncing period for each switch.
+ *
  * If you don't define it here, the matrix code will default to
  * 5, which is now closer to 10ms, but still plenty according to
  * manufacturer specs.
- *
- * Default is quite high, because of reports with some production
- * runs seeming to need it. This may change when configuration for
- * this is more directly exposed.
  */
-#define DEBOUNCE    15
-
-#define PREVENT_STUCK_MODIFIERS
+#define DEBOUNCE    10
 
 #define USB_MAX_POWER_CONSUMPTION 500