diff --git a/README.md b/README.md index 492065cf..61baade2 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,16 @@ void setup (void) { The plugin provides a `TapDance` object, but to implement the actions, we need to define a function ([`tapDanceAction`][tdaction]) outside of the object. A handler, of sorts. Nevertheless, the plugin provides one macro that is -particularly useful: +particularly useful: `tapDanceActionKeys`. Apart from that, it provides one +method only: + +### `.timeOut` + +> The number of loop iterations to wait before a tap-dance sequence times out. +> Once the sequence timed out, the action for it will trigger, even without an +> interruptor. Defaults to 5, and the timer resets with every tap of the same + +> Not strictly a method, it is a variable one can assign a new value to. ### `tapDanceActionKeys(tapCount, tapDanceAction, keys...)` diff --git a/src/Akela/TapDance.cpp b/src/Akela/TapDance.cpp index 573936f5..b57772fa 100644 --- a/src/Akela/TapDance.cpp +++ b/src/Akela/TapDance.cpp @@ -23,7 +23,7 @@ using namespace Akela::Ranges; namespace Akela { // --- state --- uint16_t TapDance::timer; - uint16_t TapDance::timeOut = 5; + uint8_t TapDance::timeOut = 5; uint8_t TapDance::tapCount[32]; uint32_t TapDance::pressedState; uint32_t TapDance::triggeredState; diff --git a/src/Akela/TapDance.h b/src/Akela/TapDance.h index fa3199d7..24b5cde8 100644 --- a/src/Akela/TapDance.h +++ b/src/Akela/TapDance.h @@ -42,12 +42,12 @@ namespace Akela { TapDance (void); virtual void begin (void) final; + static uint8_t timeOut; void actionKeys (uint8_t tapCount, ActionType tapDanceAction, uint8_t maxKeys, const Key tapKeys[]); private: static uint16_t timer; - static uint16_t timeOut; static uint8_t tapCount[32]; static uint32_t pressedState; static uint32_t triggeredState;