summaryrefslogtreecommitdiff
path: root/tests/basic/keypress.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basic/keypress.cpp')
-rw-r--r--tests/basic/keypress.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/basic/keypress.cpp b/tests/basic/keypress.cpp
index e2cc7279fb..4424e86965 100644
--- a/tests/basic/keypress.cpp
+++ b/tests/basic/keypress.cpp
@@ -68,4 +68,21 @@ TEST_F(KeyPress, ANonMappedKeyDoesNothing) {
EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0);
keyboard_task();
keyboard_task();
+}
+
+TEST_F(KeyPress, LeftShiftIsReportedCorrectly) {
+ TestDriver driver;
+ press_key(3, 0);
+ press_key(0, 0);
+ // Unfortunately modifiers are also processed in the wrong order
+ EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_A)));
+ keyboard_task();
+ EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_A, KC_LSFT)));
+ keyboard_task();
+ release_key(0, 0);
+ EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT)));
+ keyboard_task();
+ release_key(3, 0);
+ EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport()));
+ keyboard_task();
} \ No newline at end of file