Split BLE background advertising

This commit is contained in:
tonasz authored and Kyle Brown committed 2022-03-23 21:16:09 -07:00
1 parent d47143463b
commit 3687212ed7
3 files changed
+63 -13

No files matched your search

+11
View File
@@ -112,3 +112,14 @@ def hid_switch(key, keyboard, *args, **kwargs):
)
keyboard._init_hid()
return keyboard
def ble_refresh(key, keyboard, *args, **kwargs):
from kmk.hid import HIDModes
if keyboard.hid_type != HIDModes.BLE:
return keyboard
keyboard._hid_helper.stop_advertising()
keyboard._hid_helper.start_advertising()
return keyboard