-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Key press simulation non-functional on macOS #372
Comments
Hi there! I guess that this is some permission issue. Sadly, I do not have much experience in how to debug them on macOS. I think if you run Kando from the command line, the accessibility permission has to be given to your terminal application instead. And this may even differ if you run Kando from source via How do you start Kando currently? |
I currently run Kando from the installed application created by running “npm run package” after install. I’ll test what happens when running from the command line or source when i get home. |
Okay so Running from terminal with "npm start": It initially gave an error asking for accessibility permissions for Terminal. Kando had it already, terminal did not. I gave terminal permission and ran again and got another error. Here's the output:
Running from terminal by activating the kando.exe in the application contents: It worked straight away no issues. It would be an annoyance to run Kando this way however as it requires that I leave the terminal window open in the background or the app quits. Here's the output of that:
Not sure how much help this is to you but I assumed you understand far better than I what that error before shows. Also seems weird to me that running the app doesn't work, but running the .exe that is part of the app does work? Tangential question: why is "MetaLeft+Control+O" the correct hotkey? When I looked at the link you gave that showed all the keynames it would be expected that its "MetaLeft+LeftControl+KeyO" |
Yeah, that's super weird. We will have to do some more experimentation and research here. Maybe macOS gets confused if there are multiple apps with the same name? I have no idea how it maps the permission to the executable. Btw, completely restarting the process (in this case the Terminal) will be required before the newly granted permission is really available. However, I think there is not much we can do from the Kando side of things (I can only check if the permission was granted - this is done here).
There is some normalization going on here amongst other things this prefixes all single-letter key names with "Key". So both "KeyO" and "O" should be working. In fact, even "o" should work. However, this is not yet documented and that "Command" is mapped to "Control" is plain wrong on macOS. I think it should be mapped to "MetaLeft" instead. So there's still some bugs to fix and some documentation to write 😅 |
Okay re-testing the npm method in the terminal after restarting Kando shows that it also works there. It just doesn't work when run as an application. |
Hi there! I have changed a lot how key presses are simulated. I think there are still some limitations, but it should be much better now. With the latest prototype version, the key format changed. You can read more about this in the documentation. Some key presses are simply not forwarded to the system, maybe that's a limitation of the API. For instance, I cannot simulate Ctrl+Left to switch workspaces. Thankfully, there is a scripting API to explicitly pass such events to the system. In this case via At some point we can check if there are more robust ways to simulate keys but for now it seems to work quite well! |
Using the given key for key names and your comment on reddit on the subject, I tried a whole range of different descriptions for the keys to press and had no luck with any showing any function at all. I do have accessibility permissions on for Kando.
You recommended the correct listing for Cmd+Ctrl+O being "MetaLeft+Control+O". I got nothing from this so went to the docs and amended it to "MetaLeft+ControlLeft+KeyO" based on the description there. I then tried variants of these like "MetaLeft+ControlLeft+O", "MetaLeft+KeyV", "MetaLeft+V", "MetaLeft+C", "AltLeft+Space" etc. and had no response from any of these. I tried all of these and more in lowercase only also.
(and I did enable delayed to make sure it went off after the menu closed)
I could be missing something obvious but from my messing with things it sees like command and URI work perfectly while hotkey is non-functional
The text was updated successfully, but these errors were encountered: