Michael Richters
92f2f582f1
Add `afterReportingState()` event handler function
...
This event handler is useful for plugins that need to react to events, but
should wait until after those events are fully processed before doing so. This
is useful for OneShot, which needs to keep keys active until after events that
trigger their release. The `afterEachCycle()` hook is unfortunately
insufficient for this purpose, because the same event could trigger multiple
plugins (e.g. TapDance & OneShot) to resolve events, and the OneShot should
apply only to the first ensuing report.
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
c9a98ecb26
Add testcases for issue #423
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Jesse Vincent
1296e3ee66
Merge pull request #1043 from gedankenexperimenter/bug/clear-masked-keys
...
Clear masked keys in `Runtime.handleKeyswitchEvent()`
4 years ago
Michael Richters
9ac4cc5a6f
Clear masked keys on release in `Runtime.handleKeyswitchEvent()`
...
This fixes a problem with a plugin that returns `ABORT` from its
`onKeyswitchEvent()` handler, for a masked key addr. I'm convinced that a
better solution is to switch from using `Key_NoKey` (a.k.a. `Key_Masked`) to
using `Key_Transparent` as the default for new events, and thus, the value that
signals that a lookup should be done, but this at least fixes the bug for now,
with a much less intrusive change.
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
5ddd7d1867
Add testcase for issue #1042
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Jesse Vincent
cf826188a4
Merge pull request #1030 from gedankenexperimenter/timeout-check-fix
4 years ago
Jesse Vincent
290103d533
Merge pull request #1034 from gedankenexperimenter/tests/issues-fixed-by-1024
4 years ago
Jesse Vincent
d06132276f
Merge pull request #1038 from gedankenexperimenter/testing/no-report-without-comment
4 years ago
Michael Richters
86cc2c66a7
Suppress warnings when expecting no report without comment
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
ed3b9205c5
Remove timeout padding from existing testcases
...
Now that the timeout checker has been fixed, we need to remove the extra 1
millisecond from testcases that verify timeouts.
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
18a8e728f2
Fix timeout checker
...
`Runtime.hasTimeExpired()` had a minor flaw. Because it was comparing two values
using `>` instead of `>=`, it meant that a timeout set at 20ms wouldn't actually
time out until 21ms elapsed.
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
c60dd9526d
Add testcase for issue #673
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
1416bdb4c8
Add testcase for issue #571
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
5b45092221
Add SpaceCadet testcase for issue #484
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
b84d82bdb1
Add Leader testcases, including for issue #407
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Gergely Nagy
3a8eb5d839
Merge pull request #1024 from gedankenexperimenter/key-event-handler
...
New `KeyEvent` handlers and main event loop rewrite
4 years ago
Michael Richters
6bdcd01080
Add glossary entries for LiveKeys special values
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
17045d9294
Make ActiveModColor work if registered ahead of OneShot
...
If `ActiveModColorEffect` was registered ahead of `OneShot` in
`KALEIDOSCOPE_INIT_PLUGINS()`, `OSM()` and `OSL()` keys would light up in the
OneShot "sticky" state, not in the "held" or "one-shot" states. This happened
because OneShot changes the `event.key` value to the corresponding base
key (modifier or layer shift), but if ActiveModColor had already processed that
key event, it wouldn't recognize the key as a modifier/layer shift key, and
would therefore ignore it.
This change makes ActiveModColor also recognize OneShot keys as modifier/layer
shift keys.
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
60567d3d50
Begin updates to UPGRADING document for KeyEvent API changes
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
2f7fbaa3fe
Add overview documentation of event handler hook functions
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
0a5fff5005
Update example sketches' `macroAction()` functions to KeyEvent
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
c81fd4a584
Add Macros plugin example sketch
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
67bf76a99a
Simplify and standardize some testcases
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
cc8bd39c43
Add testcases for WinKeyToggle
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
f136912015
Add testcases for Turbo plugin
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
206d0681c8
Add testcases for Leader plugin
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
e101121eec
Add testcases for SpaceCadet plugin
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
5d69eca65d
Update testcase for issue 978
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
b0478b43d8
Update testcases for MagicCombo plugin
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
f7b7799756
Update testcases for TapDance plugin
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
d2cb078604
Update testcases for OneShot plugin
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
fb95769250
Update testcases for Qukeys plugin
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
ba65bf46d2
Update testcases for TopsyTurvy plugin
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
836e4af8ae
Update testcases for Macros plugin
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
78ec964b09
Update testcases: events/keyboard-state/macros
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
c1e64d0a60
Update testcases: examples/basic-keypress
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
f13e08c77a
Update testcases: events/keyboard-state/release-cleared
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
a2f720e365
Add testcases for rollover conditions on Keyboard HID keys
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
2073c4f855
Adapt miscellaneous LED mode plugins to KeyEvent handlers
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
889b664a4a
Adapt LED-ActiveModColor plugin to KeyEvent handlers
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
a734d6d8b4
Adapt IdleLEDs plugin to KeyEvent handlers
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
352fa3fb70
Adapt Kaleidoscope-Hardware-EZ-ErgoDox to KeyEvent handlers
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
3ddd12ea04
Adapt FocusSerial plugin to KeyEvent handlers
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
1ff9bb81c2
Adapt Escape-OneShot plugin to KeyEvent handlers
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
48e1130dce
Adapt EEPROM-Keymap-Programmer plugin to KeyEvent handlers
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
d7a71f92ba
Adapt Cycle plugin to KeyEvent handlers
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
a890b3ccf1
Adapt Steno(GeminiPR) plugin to KeyEvent handlers
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
b4ec77d6e1
Adapt WinKeyToggle plugin to KeyEvent handlers
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
8d8a9f7f44
Adapt TypingBreaks plugin to KeyEvent handlers
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
b535d203a6
Adapt Turbo plugin to KeyEvent handlers
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago