These are very rudimentary testcases, and already need to be rewritten, but
should serve as the first step in a process of developing better, more robust
testcases in the future.
- A single tap of a qukey alone
- A hold timeout test
- A full overlap test (subsequent key released first)
- A rollover test (subsequent key released late enough to produce primary qukey value)
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
This change adds the keycodes for keyboard modifier keys to the vector returned
by KeyboardReport::ActiveKeycodes(). Also, a simple method for getting the
modifiers byte from a keyboard hid report.
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
Because the Arduino build system doesn't -really- interface well with Makefiles, there's no other way to pick up Kaleidoscope or sketch changes from Make. This -does- slow down sim builds / test runs a bit.
Fixes#942
For now, this is just a wrapper around RunCycles(n), but the two could diverge
in the future. RunMillis(t) should always cause `t` milliseconds to elapse in
the simulator, regardless of how many cycles that takes.
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
This test runs multiple keypresses in the same cycle, and checks to see that the
last report generated contains the correct active keycodes (and no others).
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
This commit adds versions of `SimHarness::Press()` and `SimHarness::Release()`
functions that use a `KeyAddr` parameter instead of row & column integers.
to build the test.
When rollover occurs from a non-modifier key to a qukey, if we delay the release
event of that key until after the qukey's state is resolved, and if the hold
timeout is set to a fairly large value (on the order of 500ms), unintended
repeats would occur for a key that was actually only tapped. To prevent this, if
there's only one event in the queue (the press of the qukey), and we see a
release of a non-modifier key that's not the qukey, it's okay to allow that
release event to skip the queue and simply proceed as if it had been released
before the qukey was pressed.
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>