Giter Club home page Giter Club logo

keysender's People

Contributors

jordanbaird avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

little-big-h

keysender's Issues

Not seeing results

Attempted to utilize today and did not see any results.

Here is my current code.

let sender = KeySender(key: .rightArrow)
		sender.trySend(to: "TextEdit")

Some things to note:

  1. I first attempted to send .rightArrow to an app to advance to the next slide where this key will do that, but nothing happened. I did get errors a bit as I had to poke around for the actual app name, but once I got the app name, still nothing.
  2. Then I tried a similar task in Slack, moving the cursor, but nothing happened. I also tried to type a letter but nothing happened.
  3. Finally I switched to TextEdit since that was in the example and tried sending .rightArrow and .c but those didn't work either.

My thought is that I have a permissions problem?

I'm building this as a SwiftUI Mac App in XCode 14.3.1

Does not work for me

Hey @jordanbaird, your package is exactly what I was looking for. Thanks a lot. But unfortunately it doesn't work for me. I created a minimal console application to give it a try. I expect this line to open TextEdit and put the string "Hello".

try KeySender(for: "Hello World").openApplicationAndSend("TextEdit")

But unfortunately only TextEdit opens but not text appears. I already grant accessibility permissions for my console application. Do you have any idea what else could be missing?

EDIT 1: I found out that the behaviour described is related to that: https://stackoverflow.com/q/63094246. The conclusion is that adding a sleep after the line above helps. Does anyone knows a better solution?

Cheers
mahush

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.