Add testcase for issue 984

Closes #984

Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
pull/1056/head
Michael Richters 3 years ago
parent 9ed4decc7b
commit d9d8e8bc21
No known key found for this signature in database
GPG Key ID: 1288FD13E4EEF0C0

@ -0,0 +1,50 @@
/* -*- mode: c++ -*-
* Copyright (C) 2021 Keyboard.io, Inc.
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <Kaleidoscope.h>
#include <Kaleidoscope-OneShot.h>
#include <Kaleidoscope-Escape-OneShot.h>
// *INDENT-OFF*
KEYMAPS(
[0] = KEYMAP_STACKED
(
OSM(LeftShift), ___, ___, ___, ___, ___, ___,
Key_A, Key_B, ___, ___, ___, ___, ___,
Key_Escape, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___, ___,
___, ___, ___, ___,
___,
___, ___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___, ___,
___, ___, ___, ___,
___
),
)
// *INDENT-ON*
KALEIDOSCOPE_INIT_PLUGINS(OneShot, EscapeOneShot);
void setup() {
Kaleidoscope.setup();
}
void loop() {
Kaleidoscope.loop();
}

@ -0,0 +1,6 @@
{
"cpu": {
"fqbn": "keyboardio:virtual:model01",
"port": ""
}
}

@ -0,0 +1,62 @@
VERSION 1
KEYSWITCH OSM 0 0
KEYSWITCH A 1 0
KEYSWITCH B 1 1
KEYSWITCH ESC 2 0
# ==============================================================================
NAME Escape OneShot modifier
RUN 4 ms
PRESS OSM
RUN 1 cycle
EXPECT keyboard-report Key_LeftShift # report: { e1 }
RUN 4 ms
RELEASE OSM
RUN 1 cycle
RUN 4 ms
PRESS ESC
RUN 1 cycle
EXPECT keyboard-report empty # Report should be empty
RUN 4 ms
RELEASE ESC
RUN 1 cycle
RUN 5 ms
# ==============================================================================
NAME Escape sticky OneShot modifier
RUN 4 ms
PRESS OSM
RUN 1 cycle
EXPECT keyboard-report Key_LeftShift # report: { e1 }
RUN 4 ms
RELEASE OSM
RUN 1 cycle
RUN 4 ms
PRESS OSM
RUN 1 cycle
RUN 4 ms
RELEASE OSM
RUN 1 cycle
RUN 5000 ms
RUN 4 ms
PRESS ESC
RUN 1 cycle
EXPECT keyboard-report empty # Report should be empty
RUN 4 ms
RELEASE ESC
RUN 1 cycle
RUN 5 ms
Loading…
Cancel
Save