This feature creates a key that changes the current layer via tap dance. By default, this assumes that you have the following layers defined:
_ADJUST_LOWER_RAISE_MOUSEAnd sets up the following tap dance:
| Count | Action | Layer |
|---|---|---|
| 1x | hold | _ADJUST |
| 1x | tap | _MOUSE |
| 2x | tap | _LOWER |
| 3x | tap | _RAISE |
| 4x | tap | _ADJUST |
NOTE: If you use other tap-dance functions, you may require additonal setup.
Copy features/dancelayers.{c,h} into your keymap or userspace directory.
Add the following to your rules.mk
TAP_DANCE_ENABLE = yes
SRC += ./features/dancelayers.c
Add the following to your keymap.c:
#ifdef TAP_DANCE_ENABLE
# include "features/dancelayers.h"
# define TD_LAYR TD(TD_LAYERS)
#else
# define TD_LAYR XXXXXXX
#endif
Add TD_LYR to your keymap.
The following functions are available for use:
cur_danceThe following tap dance enumerations are defined:
TD_1X_HOLDTD_1X_TAPTD_2X_TAPTD_3X_TAPTD_4X_TAPIf you want to define different layers to tap dance actions, you'll need to
define two additional functions in your keymap.c:
td_lyr_finishedtd_lyr_resetBoth of these functions are necessary and require a certain pattern for each
layer. "Tap" actions are handled in *_finished while "hold" actions are
resolved in *_finished and *_reset.
See the implementation in dancelayers.c for an example.