2019-10-05 08:57:00 -07:00
|
|
|
#include QMK_KEYBOARD_H
|
|
|
|
|
|
|
|
//Tap Dance Declarations
|
|
|
|
enum {
|
2020-06-07 22:49:18 -07:00
|
|
|
TD_BL = 0
|
2019-10-05 08:57:00 -07:00
|
|
|
};
|
|
|
|
|
2022-12-14 12:40:25 -08:00
|
|
|
void dance_cln_finished(tap_dance_state_t *state, void *user_data) {
|
2020-06-07 22:49:18 -07:00
|
|
|
// noop
|
2019-10-05 08:57:00 -07:00
|
|
|
}
|
|
|
|
|
2022-12-14 12:40:25 -08:00
|
|
|
void dance_cln_reset(tap_dance_state_t *state, void *user_data) {
|
2020-06-07 22:49:18 -07:00
|
|
|
switch (state->count) {
|
|
|
|
case 1:
|
|
|
|
// single tap - step through backlight
|
|
|
|
backlight_step();
|
|
|
|
break;
|
2019-10-05 08:57:00 -07:00
|
|
|
#ifdef BACKLIGHT_BREATHING
|
2020-06-07 22:49:18 -07:00
|
|
|
case 2:
|
|
|
|
// double tap - toggle breathing
|
|
|
|
breathing_toggle();
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
// triple tap - do some pulse stuff
|
|
|
|
breathing_pulse();
|
|
|
|
break;
|
2019-10-05 08:57:00 -07:00
|
|
|
#endif
|
2020-06-07 22:49:18 -07:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2019-10-05 08:57:00 -07:00
|
|
|
}
|
|
|
|
|
2022-12-14 12:40:25 -08:00
|
|
|
tap_dance_action_t tap_dance_actions[] = {
|
2020-06-07 22:49:18 -07:00
|
|
|
[TD_BL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_cln_finished, dance_cln_reset)
|
2019-10-05 08:57:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
2020-06-07 22:49:18 -07:00
|
|
|
LAYOUT_ortho_1x1(TD(TD_BL))
|
2019-10-05 08:57:00 -07:00
|
|
|
};
|