/*********************************************************************** * A firmware Sketch for the Keyboardio Model 01 * Copyright © 2016, 2017, 2018 Gergely Nagy * Copyright © 2019 Guilhem Moulin * * 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 3 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 . **********************************************************************/ #include "TapDance.h" bool cancelOneShot = false; void tapDanceAction(uint8_t tapDanceIndex, KeyAddr keyAddr, uint8_t tapCount, kaleidoscope::plugin::TapDance::ActionType tapDanceAction) { /* Cancel any pending on-shot effects when a tap-dance key is released */ if (tapDanceAction == kaleidoscope::plugin::TapDance::Release) cancelOneShot = true; switch (tapDanceIndex) { case COLON: return tapDanceActionKeys(tapCount, tapDanceAction, LSHIFT(Key_Semicolon), Key_Semicolon); case LPB: return tapDanceActionKeys(tapCount, tapDanceAction, Key_LeftBracket, Key_LeftParen); case RPB: return tapDanceActionKeys(tapCount, tapDanceAction, Key_RightBracket, Key_RightParen); } }