Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't type with t: when sourcing from file #150

Open
RichSimon opened this issue Jun 2, 2022 · 4 comments
Open

Can't type with t: when sourcing from file #150

RichSimon opened this issue Jun 2, 2022 · 4 comments

Comments

@RichSimon
Copy link

Running MacOS 12.4

Running from command line works, typing text (into say a browser window with Google docs):

cliclick c:455,442 t:randomtext

But running the same code from a file (with -f filename) is giving a strange response - so far for me it has opened the Mac control center, and other times it seems to right-click on a dock icon? Perhaps I'm missing something obvious.

As a side note, I think there's an issue with the help text for the t: command - it's referencing "type" instead of "t":

t:text Will TYPE the given TEXT into the frontmost application.
If the text includes space(s), it must be enclosed in quotes.
Example: “type:Test” will type “Test”
Example: “type:'Viele Grüße'” will type “Viele Grüße”

@BlueM
Copy link
Owner

BlueM commented Jun 2, 2022

Could you please paste the file contents?

And regarding the help text: that’s an error indeed, thanks.

@RichSimon
Copy link
Author

RichSimon commented Jun 2, 2022

Simply:

c:600,600
t:random

Trying it now, it's bringing up the emoji panel and I get a few MacOS audible warnings ticks with the keys, when directing it to type into Google Docs in Safari. I tried including -e and -w CLI instructions along with the -f file read, but can't seem to get it to perform.

@RichSimon
Copy link
Author

After a little more work, I think somehow the mac's Function key is getting triggered somewhere. I found I could type more reliably by prepending troublesome events with ku:fn to make sure it wasn't down.

@BlueM
Copy link
Owner

BlueM commented Jul 26, 2022

I am not able to reproduce this and have no idea what may cause this behavior. Does the same happen when reading from stdin? E.g.: cliclick -f - < test.txt or cat test.txt | cliclick -f -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants