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/OneShot/basic/test.ktest

144 lines
3.0 KiB

VERSION 1
KEYSWITCH OS_shift 0 0
KEYSWITCH A 1 0
KEYSWITCH B 1 1
# ==============================================================================
NAME OneShot timeout
RUN 5 ms
PRESS OS_shift
RUN 1 cycle
EXPECT keyboard-report Key_LeftShift # The report should contain `shift`
RUN 5 ms
RELEASE OS_shift
RUN 45 ms
RUN 1 cycle
EXPECT keyboard-report empty # Report should be empty
# ==============================================================================
NAME OneShot next key
RUN 5 ms
PRESS OS_shift
RUN 1 cycle
EXPECT keyboard-report Key_LeftShift # The report should contain `shift`
RUN 5 ms
RELEASE OS_shift
RUN 10 ms
PRESS A
RUN 1 cycle
EXPECT keyboard-report Key_LeftShift Key_A # There should be `shift`+`A`
EXPECT keyboard-report Key_A # There should be only `A`
RUN 5 ms
RELEASE A
RUN 1 cycle
EXPECT keyboard-report empty # Report should be empty
# ==============================================================================
NAME OneShot double tap
RUN 5 ms
PRESS OS_shift
RUN 1 cycle
EXPECT keyboard-report Key_LeftShift # The report should contain `shift`
RUN 5 ms
RELEASE OS_shift
RUN 5 ms
PRESS OS_shift
RUN 5 ms
RELEASE OS_shift
RUN 50 ms
PRESS A
RUN 1 cycle
EXPECT keyboard-report Key_LeftShift Key_A # There should be `shift`+`A`
RUN 5 ms
RELEASE A
RUN 1 cycle
EXPECT keyboard-report Key_LeftShift # The report should contain `shift`
RUN 10 ms
PRESS A
RUN 1 cycle
EXPECT keyboard-report Key_LeftShift Key_A # There should be `shift`+`A`
RUN 5 ms
RELEASE A
RUN 1 cycle
EXPECT keyboard-report Key_LeftShift # The report should contain `shift`
RUN 5 ms
PRESS OS_shift
RUN 5 ms
RELEASE OS_shift
RUN 1 cycle
EXPECT keyboard-report empty # Report should be empty
# ==============================================================================
NAME OneShot double tap timeout
RUN 5 ms
PRESS OS_shift
RUN 1 cycle
EXPECT keyboard-report Key_LeftShift # The report should contain `shift`
RUN 5 ms
RELEASE OS_shift
RUN 20 ms
PRESS OS_shift
RUN 5 ms
RELEASE OS_shift
RUN 1 cycle
EXPECT keyboard-report empty # Report should be empty
RUN 50 ms
PRESS A
RUN 1 cycle
EXPECT keyboard-report Key_A # There should be only `A`
RUN 5 ms
RELEASE A
RUN 1 cycle
EXPECT keyboard-report empty # Report should be empty
RUN 10 ms
# ==============================================================================
NAME OneShot hold timeout
RUN 5 ms
PRESS OS_shift
RUN 1 cycle
EXPECT keyboard-report Key_LeftShift # The report should contain `shift`
RUN 30 ms
RELEASE OS_shift
RUN 1 cycle
EXPECT keyboard-report empty # Report should be empty
# ==============================================================================
NAME OneShot rollover
RUN 5 ms
PRESS OS_shift
RUN 1 cycle
EXPECT keyboard-report Key_LeftShift # The report should contain `shift`
RUN 5 ms
PRESS A
RUN 1 cycle
EXPECT keyboard-report Key_LeftShift Key_A # There should be `shift`+`A`
RUN 5 ms
RELEASE OS_shift
RUN 1 cycle
EXPECT keyboard-report Key_A # There should be only `A`
RUN 5 ms
RELEASE A
RUN 1 cycle
EXPECT keyboard-report empty # Report should be empty