Keyboard Builders' Digest
Save 5% at BeaverKeys (CA/US)! Code: KBDNEWS
Keyboard Builders' Digest / Tips & Tricks

QMK debounce masterclass

QMK contributor u/x34l explains different debounce algorithms and shares some of his measurements.

KBD.news
Published November 4, 2020
Creators! Feel free to tip me off about your keyboard related projects to bring them to 150K readers.

In his post, fellow Redditor x34l sheds some light on debounce algorithms.

Hi, I'm one of the (many) devs who did debouncing code at some point for QMK – x34l.

The default debounce algorithm has some latency repercussions meaning you can get some nasty 30ms+ response times sometimes while typing.

There are a few algorithms available (eager-pr, eager-pk) that reduce latency by 5-10ms.

Do note that to get the best algorithm, you need to find out your scan rate.

If it's below 500, try eager-pr, and if its above 800, try eager-pk.

Allegedly, some keyboards such as ErgodoxEZ were plagued by latency in the default algorithm, and an eager-pr/eager-pk style debounce reduced latency by a noticeable amount.

More info:

https://docs.qmk.fm/#/feature_debounce_type

tl;dr

In rules.mk:

if you have DEBOUNCE_TYPE = CUSTOM then leave it.

Otherwise: DEBOUNCE_TYPE = sym_eager_pk or DEBOUNCE_TYPE = sym_eager_pr

Finally, here is a click latency video, using Goose Enterprises' LagMeter:

Do you like this post? Share, donate, subscribe, tip me off!

Published on Wed 4th Nov 2020. Featured in KBD #1 (source).


Related

3D-printed PCB

A printed circuit board. Literally. PCB 3D-printed by duzitbetter (reddit, hackaday).

Modular keyboard using rails

WarhammerBueno designed a keyboard with a replaceable numpad – using a unique rail system.

Soldering a YC8 connector

A video tutorial on soldering the YC8 detachable connector by actionspacecake.

Keycap vacuum coating

Drygol's first attempt to keycap vacuum coating failed, but the idea is not bad (blog) - article posted by LASERman71.

Elite-C holder PCB

Elite-C holder PCB for Dactyl-like cases with audio jack, M4 screw holes, reset button, RGB output by Fmcraft (git).

Transparent PCB

PCBBUY experimented with transparent (glass) PCBs.

×
top