Closed Timoses closed 3 years ago
There are two main methods to help troubleshoot.
One is to use the text engine. This cuts the speech recognition framework out of the equation.
The second and most applicable would be to use a python file with the '.execute()' example 'Text("test text").execute()'/'Key("w-c").execute()' or any other dragonfly action.
In both situations you can set the debugging levels for dragonfly for actions. That way the logs are a lot cleaner. In addition it provides a simple test case that duplicates the issue.
> cat test.py
from dragonfly import Text
Text("test text").execute()
Would this work? I'd expect 'test text' to be typed when I execute it with python test.py
.
However, nothing happens.
Yes I believe that should work although I run it through vs code.
from dragonfly import Text
import logging
logging.getLogger("action").setLevel(logging.DEBUG)
logging.basicConfig()
Text("test test").execute()
See logging and default_levels for more options.
Hi @Timoses,
Thank you for your report. Is the app running Python (e.g. Terminal) listed in the macOS preferences for apps allowed to control your computer? These apps are listed under System Preferences -> Security & Privacy -> Privacy (tab) -> Accessibility (section).
If the relevant app has accessibility access on your system, then I'm not sure what else could be causing this to happen. I was only able to replicate this behaviour on macOS 11.2.3 by revoking accessibility access.
Yes, Alacritty (my terminal emulator) is in the accessibility section.
I just added 'tmux' to it (System Preferences -> Security & Privacy -> Privacy (tab) -> Accessibility) and now it works.. Didn't think that would be it because it worked previously.
Thanks for the hint.
Ah, that is odd. Glad you got that sorted out.
I have opened a pynput issue for this: https://github.com/moses-palmer/pynput/issues/389. pynput is the input library we use on macOS. I think a warning message should be printed if there is no accessibility access.
Since some time keyboard input/control does not work any more (e.g. Caster dictation).
Dragonfly recognizes the command, but does not type anything.
Here's the log:
Platform: MacOS (11.2.3)
Any idea?