Keyboard connector
This module provides the whad.unifying.keyboard.Keyboard
class that
behaves like a Logitech Unifying keyboard. This connector is able to synchronize
with an existing keyboard dongle and send spoofed events.
- class whad.unifying.connector.keyboard.Keyboard(device: WhadDevice)[source]
Logitech Unifying Keyboard interface for compatible WHAD device.
- property address: str
Current device address
- Returns:
current device address
- Return type:
str
- property aes_counter: int
Current AES counter value
- Returns:
AES counter value
- Return type:
int
- property channel: int
Current channel in use
- Returns:
current channel in use
- Return type:
int
- property key: bytes
Current encryption key
- Returns:
encryption key
- Return type:
bytes
- send_key(key, ctrl: bool = False, alt: bool = False, shift: bool = False, gui: bool = False) bool [source]
Send a keypress with modifiers.
- Parameters:
key (bytes) – Key to send
ctrl (bool) – CONTROL key modifier enabled if set to
True
alt (bool) – ALT key modifier enabled if set to
True
shift (bool) – SHIFT key modifier enabled if set to
True
gui (bool) – GUI key modifier enabled if set to
True
- Returns:
True
if key has been successfully injected,False
otherwise.- Return type:
bool
- property stack: ESBStack
Current ESB stack in use
- Returns:
ESB stack instance
- Return type:
whad.esb.stack.ESBStack