Add Esc cancel support
This commit is contained in:
parent
b3be444625
commit
f9224621fa
6 changed files with 19 additions and 0 deletions
|
|
@ -66,6 +66,10 @@ class X11Adapter:
|
|||
thread = threading.Thread(target=self._listen, args=(hotkey, callback), daemon=True)
|
||||
thread.start()
|
||||
|
||||
def start_cancel_listener(self, callback: Callable[[], None]) -> None:
|
||||
thread = threading.Thread(target=self._listen, args=("Escape", callback), daemon=True)
|
||||
thread.start()
|
||||
|
||||
def inject_text(self, text: str, backend: str) -> None:
|
||||
backend = (backend or "").strip().lower()
|
||||
if backend in ("", "clipboard"):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue