diff --git a/README.md b/README.md index 89753b00..e3b8d514 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,16 @@ void setup () { > Turns the SpaceCadet Shift behaviour off, making the `Shift` keys work as they > did before, without the additional behaviour. +### `.timeOut` + +> The number of loop iterations to wait before considering a held key in +> isolation as its secondary role. That is, we'd have to hold a `Shift` key +> this long, by itself, to trigger the `Shift` role in itself. +> +> Not strictly a method, it is a variable one can assign a new value to. +> +> Defaults to 40. + ## Further reading Starting from the [example][plugin:example] is the recommended way of getting diff --git a/src/Akela/SpaceCadet.cpp b/src/Akela/SpaceCadet.cpp index 20e2cc7c..158265fb 100644 --- a/src/Akela/SpaceCadet.cpp +++ b/src/Akela/SpaceCadet.cpp @@ -22,7 +22,7 @@ namespace Akela { uint8_t SpaceCadetShift::parenNeeded; uint8_t SpaceCadetShift::timer; - const uint8_t SpaceCadetShift::timeOut = DEFAULT_TIMEOUT * 2; + uint8_t SpaceCadetShift::timeOut = 40; Key SpaceCadetShift::leftParen, SpaceCadetShift::rightParen; SpaceCadetShift::SpaceCadetShift () { diff --git a/src/Akela/SpaceCadet.h b/src/Akela/SpaceCadet.h index 0749e9d8..e8baf643 100644 --- a/src/Akela/SpaceCadet.h +++ b/src/Akela/SpaceCadet.h @@ -28,13 +28,13 @@ namespace Akela { virtual void begin (void) final; static void configure (Key left, Key right); + static uint8_t timeOut; void on (void); void off (void); private: static uint8_t parenNeeded; static uint8_t timer; - static const uint8_t timeOut; static Key leftParen, rightParen; static Key eventHandlerHook (Key mappedKey, byte row, byte col, uint8_t keyState);