You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Kaleidoscope/tests/plugins/SpaceCadet/basic/test.ktest

126 lines
2.7 KiB

VERSION 1
KEYSWITCH LSHIFT 0 0
KEYSWITCH RSHIFT 0 1
KEYSWITCH A 1 0
KEYSWITCH B 1 1
# ==============================================================================
NAME SpaceCadet tap
RUN 5 ms
PRESS LSHIFT
RUN 5 ms
RELEASE LSHIFT
RUN 1 cycle
EXPECT keyboard-report Key_X # Report should contain `X` (0x1B)
EXPECT keyboard-report empty # Report should be empty
RUN 5 ms
# ==============================================================================
NAME SpaceCadet hold
RUN 5 ms
PRESS LSHIFT
RUN 1 cycle
RUN 10 ms
RUN 1 cycle
EXPECT keyboard-report Key_LeftShift # Report should contain `shift` (0xE1)
RUN 5 ms
RELEASE LSHIFT
RUN 1 cycle
EXPECT keyboard-report empty # Report should be empty
# ==============================================================================
NAME SpaceCadet hold with global timeout
RUN 5 ms
PRESS RSHIFT
RUN 1 cycle
RUN 20 ms
RUN 1 cycle
EXPECT keyboard-report Key_RightShift # Report should contain `shift` (0xE5)
RUN 5 ms
RELEASE RSHIFT
RUN 1 cycle
EXPECT keyboard-report empty # Report should be empty
# ==============================================================================
NAME SpaceCadet interrupt
RUN 5 ms
PRESS LSHIFT
RUN 1 cycle
RUN 3 ms
PRESS A
RUN 1 cycle
EXPECT keyboard-report Key_LeftShift # Report should contain `shift` (0xE1)
EXPECT keyboard-report Key_LeftShift Key_A # Report should add `A` (0x04, 0xE1)
RUN 3 ms
RELEASE LSHIFT
RUN 1 cycle
EXPECT keyboard-report Key_A # Report should contain only `A` (0x04)
RUN 3 ms
RELEASE A
RUN 1 cycle
EXPECT keyboard-report empty # Report should be empty
# ==============================================================================
NAME SpaceCadet interrupt SpaceCadet with tap
RUN 5 ms
PRESS LSHIFT
RUN 1 cycle
RUN 3 ms
PRESS RSHIFT
RUN 1 cycle
EXPECT keyboard-report Key_LeftShift # Report should contain `shift` (0xE1)
RUN 3 ms
RELEASE RSHIFT
RUN 1 cycle
EXPECT keyboard-report Key_LeftShift Key_Y # Report should add `Y` (0x1C)
EXPECT keyboard-report Key_LeftShift # Report should contain `shift` (0xE1)
RUN 3 ms
RELEASE LSHIFT
RUN 1 cycle
EXPECT keyboard-report empty # Report should be empty
# ==============================================================================
NAME SpaceCadet interrupt SpaceCadet with hold
RUN 5 ms
PRESS LSHIFT
RUN 1 cycle
RUN 3 ms
PRESS RSHIFT
RUN 1 cycle
EXPECT keyboard-report Key_LeftShift # Report should contain `shift` (0xE1)
RUN 20 ms
RUN 1 cycle
EXPECT keyboard-report Key_LeftShift Key_RightShift # Report should contain both `shift` keycodes (0xE1, 0xE5)
RUN 5 ms
RELEASE LSHIFT
RUN 1 cycle
EXPECT keyboard-report Key_RightShift # Report should contain `shift` (0xE5)
RUN 3 ms
RELEASE RSHIFT
RUN 1 cycle
EXPECT keyboard-report empty # Report should be empty