Update mouse_keys.py

Added check for USB enabled half in case of a split keyboard.
Cleaning of hid_pending state after sending.
This commit is contained in:
kbjunky 2022-07-24 12:24:27 +08:00 committed by Kyle Brown
parent 5a85c6cfb3
commit a1d8a990f1

View File

@ -123,8 +123,9 @@ class MouseKeys(Module):
return
def before_hid_send(self, keyboard):
if self.pointing_device.hid_pending:
if self.pointing_device.hid_pending and keyboard._hid_send_enabled:
keyboard._hid_helper.hid_send(self.pointing_device._evt)
self.pointing_device.hid_pending = False
return
def after_hid_send(self, keyboard):