diff --git a/README.md b/README.md index dfc10483..04efe45e 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,16 @@ The plugin provides the `Leader` object, with the following methods: > are final actions, where one does not wish to continue the leader sequence > further in the hopes of finding a longer match. +### `.timeOut` + +> The number of loop iterations to wait before a sequence times out. Once the +> sequence timed out, if there is a partial match with an action, that will be +> performed, otherwise the Leader sequence will simply reset. +> +> Not strictly a method, it is a variable one can assign a new value to. +> +> Defaults to 20. + ## Further reading Starting from the [example][plugin:example] is the recommended way of getting diff --git a/src/Akela/Leader.h b/src/Akela/Leader.h index c11f2ed0..618e159a 100644 --- a/src/Akela/Leader.h +++ b/src/Akela/Leader.h @@ -42,6 +42,7 @@ namespace Akela { static void configure (const dictionary_t dictionary[]); static void reset (void); + static uint8_t timeOut; void inject (Key key, uint8_t keyState); @@ -49,7 +50,6 @@ namespace Akela { static Key sequence[LEADER_MAX_SEQUENCE_LENGTH + 1]; static uint8_t sequencePos; static uint8_t timer; - static uint8_t timeOut; static const Leader::dictionary_t *dictionary; static Key eventHandlerHook (Key mappedKey, byte row, byte col, uint8_t keyState);