Commit graph

10 commits

Author SHA1 Message Date
Stefan Kerkmann
c68e4dec10
[Core] suspend: suppress wake up keypress (#23389)
* suspend: suppress wake up keypress

Waking the host from suspend is done by pressing any key on the
keyboard, the regular key codes assigned to the keys are not important
and must not be sent - otherwise they usually end up in password prompts
as ghost characters that have to be deleted again. This commit adds
suppression for all keys pressed at the time of wake up. Once a key is
released it functions as a regular key again.

Signed-off-by: Stefan Kerkmann <karlk90@pm.me>

* suspend: update wake up matrix after wake up delay

If USB_SUSPEND_WAKEUP_DELAY is set, the keyboard sleeps during wake up -
which can be up to multiple seconds. To handle key presses and releases
in that time frame we have to handle the following cases:

1. Key not pressed before suspend, and not pressed after wakeup → do
   nothing (normal case).
2. Key not pressed before suspend, but pressed after wakeup → set the
   wakeup_matrix bit to 1 (so that the press and release events would be
   suppressed).
3. Key pressed before suspend, but not pressed after wakeup → do nothing
   (the release event will be generated on the first matrix_task() call
   after the wakeup).
4. Key pressed before suspend, and still pressed after wakeup → do
   nothing (the release event will be generated some time later).

Signed-off-by: Stefan Kerkmann <karlk90@pm.me>
Co-authored-by: Sergey Vlasov <sigprof@gmail.com>

* keyboards: anavi: macropad8: disable snake and rgb_test effects

...to shrink the binary size.
2025-11-11 23:35:03 +11:00
Joel Challis
bc5c5e3251
Align sleep_led logic (#25395) 2025-06-27 08:17:28 +01:00
Joel Challis
63dd131d81
Refactor vusb to protocol use pre/post task (#14944) 2024-03-14 21:45:12 +11:00
Joel Challis
79020519b4
Align VUSB suspend protocol logic (#22688) 2024-02-01 15:33:57 +00:00
Ryan
cbf538aaaa
V-USB: Add generic send_report() function (#22323) 2023-11-26 22:50:21 +11:00
Joel Challis
047ef3cd12
VUSB - Use correct endpoint poll for VIA (#16691) 2022-03-19 17:40:47 +00:00
QMK Bot
63646e8906
Format code according to conventions (#16322) 2022-02-12 18:29:31 +00:00
Joel Challis
634e42b2b4
Revert to old init order for host driver (#15029)
* Partially revert 14888
2021-11-02 18:53:46 +00:00
Joel Challis
2ec268bd21
Begin to carve out platform/protocol API - Migrate keyboard_* calls (#14888) 2021-10-24 20:39:41 +01:00
Joel Challis
96e2b13d1d
Begin to carve out platform/protocol API - Single main loop (#13843)
* Begin to carve out platform/protocol API

* Fix up after rebase
2021-08-18 00:11:07 +01:00
Renamed from tmk_core/protocol/vusb/main.c (Browse further)