Add BLE_DISCONNECT key

This commit is contained in:
xs5871
2023-02-14 20:35:00 +00:00
committed by xs5871
parent dc9b5f4512
commit 449aab7dcb
2 changed files with 11 additions and 0 deletions

View File

@@ -127,3 +127,13 @@ def ble_refresh(key, keyboard, *args, **kwargs):
keyboard._hid_helper.stop_advertising()
keyboard._hid_helper.start_advertising()
return keyboard
def ble_disconnect(key, keyboard, *args, **kwargs):
from kmk.hid import HIDModes
if keyboard.hid_type != HIDModes.BLE:
return keyboard
keyboard._hid_helper.clear_bonds()
return keyboard