]> git.donarmstrong.com Git - qmk_firmware.git/commit
tap-dance: Support user_data for the callbacks
authorGergely Nagy <algernon@madhouse-project.org>
Wed, 20 Jul 2016 09:34:45 +0000 (11:34 +0200)
committerGergely Nagy <algernon@madhouse-project.org>
Fri, 22 Jul 2016 07:10:17 +0000 (09:10 +0200)
commitce8cc9219fca5dde077f1142d03d011b38d27479
tree01991fe739a7fd2702e010f0132033672a5d9d45
parent70e42489dec375e558d8e81ed5ebfb69b4f3dbd9
tap-dance: Support user_data for the callbacks

Refactored the code a little, so all callbacks now receive a `user_data`
pointer, which can be anything. As an example, the key pairs from
`ACTION_TAP_DANCE_DOUBLE` now use this, and custom, built-in functions.

This makes it easier to extend the tap dance functionality, and also
simplifies the code a little.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
quantum/process_keycode/process_tap_dance.c
quantum/process_keycode/process_tap_dance.h