Update BlueDucky.py

This commit is contained in:
Opabinia 2024-01-19 21:29:39 +13:00 committed by GitHub
parent afc26dab9a
commit 643c6c40c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -235,11 +235,14 @@ class L2CAPClient:
if args: if args:
log.debug(f"Attempting to send... {args}") log.debug(f"Attempting to send... {args}")
self.send(self.encode_keyboard_input(*args)) self.send(self.encode_keyboard_input(*args))
time.sleep(delay)
# Send an empty report to release the key
self.send(self.encode_keyboard_input())
time.sleep(delay)
else: else:
# If no arguments, send an empty report to release keys # If no arguments, send an empty report to release keys
self.send(self.encode_keyboard_input()) self.send(self.encode_keyboard_input())
time.sleep(delay) time.sleep(delay)
# Update current_position here after successful send
return True # Indicate successful send return True # Indicate successful send
def send_keyboard_combination(self, modifier, key, delay=0.004): def send_keyboard_combination(self, modifier, key, delay=0.004):