swift-project / pilotclient

Cross-platform cross-simulator pilot client for virtual air traffic networks
https://swift-project.org
GNU General Public License v3.0
93 stars 27 forks source link

[macOS] keyboard hotkeys not working #125

Closed oktal3700 closed 9 months ago

oktal3700 commented 2 years ago

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

jonaseberle commented 2 years ago

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.

oktal3700 commented 2 years ago

@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.

jonaseberle commented 2 years ago

@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.

oktal3700 commented 2 years ago

@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?

jonaseberle commented 2 years ago

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

ltoenning commented 9 months ago

@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).

oktal3700 commented 9 months ago

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.

ltoenning commented 9 months ago

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 commented 9 months ago

For completeness:

So this is fixed now.