pilotclient icon indicating copy to clipboard operation
pilotclient copied to clipboard

[macOS] keyboard hotkeys not working

Open oktal3700 opened this issue 3 years ago • 5 comments

Since the release of swift 0.9.6 and 0.9.7 we are getting some reports of not being able to assign or use keyboard hotkeys, with all permissions correctly set, and 0.9.5 is not affected.

https://discord.com/channels/539048679160676382/567983892791951374/902595063534714951

oktal3700 avatar Oct 26 '21 21:10 oktal3700

I can confirm on Linux, too (0.9.6.91). I followed https://docs.swift-project.org/doku.php?id=hotkeys_such_ptt_push_talk_joystick_hotkey_not_working - please tell me if I can help by providing more information.

jonaseberle avatar Dec 04 '21 18:12 jonaseberle

@jonaseberle On Linux make sure your user account is a member of the input group:

sudo usermod -a -G input yourusername

Then log out of Linux, log back in and try again.

oktal3700 avatar Dec 05 '21 13:12 oktal3700

@oktal3700 Great, that was the problem! When searching for it, I find it mentioned in some forums. Can I help documenting it in the Swift docs (or is it already there?).

I think it should go here, maybe a short notice with a link to that everywhere Hotkeys are mentioned and Linux is relevant.

jonaseberle avatar Dec 05 '21 13:12 jonaseberle

@jonaseberle Yeah, and it should definitely go here, too. The docs are in dire need of some love. Most pages are still waiting to be converted from an older wiki format.

The next version of swift will display an error if it doesn't have the necessary permissions to access the keyboard or joystick.

I will create a login for you on the wiki, as soon as I can figure out how 😅

Are you in our discord?

oktal3700 avatar Dec 06 '21 21:12 oktal3700

I just joined your Discord. Happy to help improve the docs.

jonaseberle avatar Dec 10 '21 07:12 jonaseberle

@oktal3700 Is this already fixed with your last commits? When opening swift for the first time, this dialog now appears: Screenshot 2023-12-11 at 12 21 07

If the user enables Input Monitoring in the system settings, everything works as expected. If the user denies, this dialog is not shown again, except if the user resets the privacy database (for example with tccutil reset ListenEvent; this resets all permissions for Input Monitoring).

ltoenning avatar Dec 11 '23 11:12 ltoenning

Is this already fixed with your last commits?

Yes, this should have been closed already.

If the user denies, this dialog is not shown again

But there should be an error message in swift itself.

oktal3700 avatar Dec 11 '23 19:12 oktal3700

But there should be an error message in swift itself.

Only in the console output and log file. Not in the log widget of swiftgui nor did any popup message appear.

ltoenning avatar Dec 11 '23 20:12 ltoenning

For completeness:

  • 27f7d4d65 added support for requesting input monitoring permission
  • 46e6eab added a swift warning message that is shown if the user denied this permission

So this is fixed now.

ltoenning avatar Dec 14 '23 18:12 ltoenning