use set_keyboard_focus to avoid moving cursor

This commit is contained in:
2023-02-15 15:00:22 +01:00
parent c402999b2f
commit 1c302221e3

View File

@@ -18,6 +18,8 @@ def send_text(text: str) -> None:
data.log.warning(f'Window Title "{config.conf["General"]["poe_window_title"]}" not found')
return
text = escape_mods(text)
win.set_keyboard_focus()
win.wait(wait_for='active')
win.type_keys('{ENTER}^A{DELETE}' + text + '{ENTER}', with_spaces=True, pause=config.conf['General']['after_sendkeys_key_wait'])