How can I get Autokey (on Linux Mint) to hold down Shift to select text?

60 Views Asked by At

all! Using Autokey on Linux Mint (xfce). I am trying to write a simple script that will send a chunk of text, then move the cursor back and select some of that text.

Inserting is no problem, of course. Neither is moving the cursor. But I can't get it to select the text.

A simplified version of what I'm trying:

keyboard.send_keys("<p class='whatever'>Put your text here</p>")
keyboard.send_key('<left>', repeat=4)
keyboard.press_key('<shift>')
keyboard.send_key('<left>', repeat=18)
keyboard.release_key('<shift>')

I'm trying to get it to send that text, then select the phrase "Put your text here" so the user overwrites that when he starts typing. It works perfectly except for the selection part. I'm sure I'm missing something obvious, but I can't figure it.

Thanks for any help!

0

There are 0 best solutions below