Merge pull request #1056 from gedankenexperimenter/test/issue-984
Add testcase for issue 984pull/1058/head
commit
a09e6b0bdb
@ -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…
Reference in new issue