[Core] Don't send keyboard reports that propagate no changes to the host (#14065)
This commit is contained in:
parent
ce5a2a7367
commit
8b865a9d64
10 changed files with 51 additions and 71 deletions
|
@ -117,7 +117,6 @@ TEST_F(PermissiveHold, tap_regular_key_while_layer_tap_key_is_held) {
|
|||
testing::Mock::VerifyAndClearExpectations(&driver);
|
||||
|
||||
/* Release regular key */
|
||||
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport()));
|
||||
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(layer_key.report_code)));
|
||||
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport()));
|
||||
regular_key.release();
|
||||
|
@ -125,7 +124,7 @@ TEST_F(PermissiveHold, tap_regular_key_while_layer_tap_key_is_held) {
|
|||
testing::Mock::VerifyAndClearExpectations(&driver);
|
||||
|
||||
/* Release layer-tap-hold key */
|
||||
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport()));
|
||||
EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0);
|
||||
layer_tap_hold_key.release();
|
||||
run_one_scan_loop();
|
||||
testing::Mock::VerifyAndClearExpectations(&driver);
|
||||
|
|
|
@ -119,7 +119,6 @@ TEST_F(PermissiveHold_IgnoreModTapInterrupt, tap_regular_key_while_layer_tap_key
|
|||
testing::Mock::VerifyAndClearExpectations(&driver);
|
||||
|
||||
/* Release regular key */
|
||||
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport()));
|
||||
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_B)));
|
||||
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport()));
|
||||
regular_key.release();
|
||||
|
@ -127,7 +126,7 @@ TEST_F(PermissiveHold_IgnoreModTapInterrupt, tap_regular_key_while_layer_tap_key
|
|||
testing::Mock::VerifyAndClearExpectations(&driver);
|
||||
|
||||
/* Release layer-tap-hold key */
|
||||
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport()));
|
||||
EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0);
|
||||
layer_tap_hold_key.release();
|
||||
run_one_scan_loop();
|
||||
testing::Mock::VerifyAndClearExpectations(&driver);
|
||||
|
|
|
@ -31,9 +31,8 @@ TEST_F(ActionLayer, LayerTapToggleWithToggleWithKeypress) {
|
|||
set_keymap({layer_key, regular_key, KeymapKey{1, 1, 0, KC_B}});
|
||||
|
||||
/* Tap TT five times . */
|
||||
/* TODO: QMK currently sends an empty report even if nothing needs to be reported to the host! */
|
||||
/* TODO: Tapping Force Hold breaks TT */
|
||||
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(10);
|
||||
EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0);
|
||||
|
||||
layer_key.press();
|
||||
run_one_scan_loop();
|
||||
|
|
|
@ -60,7 +60,6 @@ TEST_F(TappingForceHold, tap_regular_key_while_mod_tap_key_is_held) {
|
|||
testing::Mock::VerifyAndClearExpectations(&driver);
|
||||
|
||||
/* Idle for tapping term of mod tap hold key. */
|
||||
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT)));
|
||||
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_A)));
|
||||
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT)));
|
||||
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport()));
|
||||
|
@ -101,7 +100,6 @@ TEST_F(TappingForceHold, tap_mod_tap_key_while_mod_tap_key_is_held) {
|
|||
testing::Mock::VerifyAndClearExpectations(&driver);
|
||||
|
||||
/* Idle for tapping term of first mod tap hold key. */
|
||||
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT)));
|
||||
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_A)));
|
||||
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT)));
|
||||
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue