X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=quantum%2Fprocess_keycode%2Fprocess_tap_dance.h;h=f42c154a056da303a3045b542600a7152ee59169;hb=9de443cbf10ac41bc15762c9c83f138f51dd3b9a;hp=49b06e4508e1d930c84127cc420814e77592026a;hpb=0edc82f0300924394324e2f3c4d2f8f0008439db;p=qmk_firmware.git diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h index 49b06e450..f42c154a0 100644 --- a/quantum/process_keycode/process_tap_dance.h +++ b/quantum/process_keycode/process_tap_dance.h @@ -1,3 +1,18 @@ +/* Copyright 2016 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #ifndef PROCESS_TAP_DANCE_H #define PROCESS_TAP_DANCE_H @@ -9,6 +24,7 @@ typedef struct { uint8_t count; + uint8_t oneshot_mods; uint16_t keycode; uint16_t timer; bool interrupted; @@ -28,6 +44,7 @@ typedef struct qk_tap_dance_user_fn_t on_reset; } fn; qk_tap_dance_state_t state; + uint16_t custom_tapping_term; void *user_data; } qk_tap_dance_action_t; @@ -44,10 +61,18 @@ typedef struct #define ACTION_TAP_DANCE_FN(user_fn) { \ .fn = { NULL, user_fn, NULL }, \ + .user_data = NULL, \ } #define ACTION_TAP_DANCE_FN_ADVANCED(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset) { \ .fn = { user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset }, \ + .user_data = NULL, \ + } + +#define ACTION_TAP_DANCE_FN_ADVANCED_TIME(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset, tap_specific_tapping_term) { \ + .fn = { user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset }, \ + .user_data = NULL, \ + .custom_tapping_term = tap_specific_tapping_term, \ } extern qk_tap_dance_action_t tap_dance_actions[];