By starting the lockout end timer at the moment of the last keypress
instead of the current time, the effective time of the lockout is
reduced by the amount of time the user has already been idle at the
time the lockout begins. Basically, the user gets credit for time
already spent not typing.
While we use milliseconds internally, the end-user will not need higher
precision than a second, therefore, store the settings with second-precision.
This is much friendlier towards the user, and also uses less space in EEPROM, by
about six bytes.
Addresses a part of #8, thanks @gedankenexperimenter!
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
Use `Kaleidoscope.use` and `Kaleidoscope.useEventHandlerHook` instead of the
deprecated `USE_PLUGINS` and `event_handler_hook_use` interfaces.
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
The callback can't prevent the action, but it can have side effects, such as
lighting up the LEDs, when the keyboard becomes locked (or unlocked).
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
This makes it possible to persist the settings in EEPROM too, and allow setting
them via Focus.
Fixes#2.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>