Expose the timeOut

Fixes #1.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
pull/389/head
Gergely Nagy 8 years ago
parent 9a2f79e42d
commit 014d7f69be

@ -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

@ -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 () {

@ -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);

Loading…
Cancel
Save