#include"tap-hold.h"#ifndef TAP_HOLD_TIME
#defineTAP_HOLD_TIME200#endifuint16_t tap_hold_timer;voidtap_or_hold( keyrecord_t *record,uint16_ttap,uint16_thold){if( record->event.pressed){
tap_hold_timer =timer_read();}else{if( tap_hold_timer &&timer_elapsed( tap_hold_timer )> TAP_HOLD_TIME ){/* Held down then released */tap_code( hold );}else{/* Quickly Tapped */tap_code( tap );}
tap_hold_timer =0;}}