“Discord” would like to receive keystrokes from any application
twitter.com
twitter.com
Whether you should trust them with that capacity to run a keylogger on your system is a good question though.
Requires DE integration. Currently works on KDE only.
1. This is for Push to Talk (PTT), and is not meant maliciously.
2. It's not good that an app is asking for this permission.
For #2, I'm not sure, but think the issue might be that Apple's system doesn't allow for sufficiently fine-grained permissions. Certainly that has been a repeated problem for other apps, as Apple has tried to improve end-user security.
Binding a hot-key to an action shouldn't require knowing anything about the stream of characters that a user is typing. But when the permission model isn't specific enough, that's what you get.
I think Apple's approach is mostly good (being able to listen to keystrokes without permission is very bad), but it has some costs.
If anyone has a good solution, I'd appreciate to hear it(I just dropped the feature <- then 3 months later shut the project down and only use it for me now haha).
if this isn’t the logical thing you’d do, i pray i never have to use any software you work on since i'd gladly assume it's devoid of any thought, much less empathy.
It's nothing new -- the keystroke permission is required to enable Push-to-Talk (PTT), where you press or hold a key to activate the microphone in audio calls/chats.
Admittedly Discord have been terrible at stating this, and don't have a simple FAQ or explanation for something that's been going on for over 3 years, but there's nothing nefarious going on.
https://support.discord.com/hc/en-us/articles/360035130231--...
You could reasonably argue that this is an API shortcoming on macOS - there's no real way that I'm aware of to add a global key handler outside of accessibility APIs, and those APIs basically just let you do nothing or listen to everything and then filter the events in your app.
On windows you can just add any global handler you want, and there’s now no way to prevent apps from doing that since that would be a breaking change.
This was introduced in macOS Catalina (10.15), released in early October 2019. It's nothing new -- Discord are just useless at explaining it.
The permission in question is needed for any app that wants to read from things varying from keystrokes to your Contacts, or even full disk access (for reading your personal folders).
Any app requiring said permissions prior to Catalina would have to accept this, and if permission isn't given, access to the required resource isn't granted -- simple.
Fundamentally I guess it’s just a difference in philosophy in Windows. They basically say that “if it worked under Win32 20 years ago then it also works in Win32 20 years into the future, even if the behavior is an obvious bug”. Microsoft obviously release newer frameworks (UWP/Store/..) which allow for new restrictions, but few seem to want to give up access to the core platform and it’s unlikely to change.
The UAC system introduced a way of adding permissions with compatibility by popping up permission dialogs when required. But it doesn’t seem feasible to do for input hooks for example (I could be wrong here).
They /could/ wait to make that request only after someone chooses the PTT option, but given they don't even communicate properly about why this dialog appears -- over 3 years after its introduction -- it's unlikely they're going to change it.
Would you rather they remove PTT functionality (which can reduce accessibility for some users), or that macOS didn't have such fine permissions? -- because that's the only way you're going to have that dialog go away...
If you don't trust the app or the "supply chain," don't use it. There are plenty FLOSS apps out there which have completely free client- and server-side source code you can review at your leisure, nobody is "forcing" you to use Discord.
The same thing happens in windows to some extent, especially if the app/game your using is running as admin then PTT won’t work unless Discord is also running as admin.
I don't use Discord for gaming comms. I just use it as a chat tool, and I don't need PTT outside of the app. Give me that option. It's not that hard to do.
Discord doesn't have a choice if that's the case. Blame Apple for not providing a sane API.
The permissions change is nothing new (introduced Fall 2019), and covers many more permissions than simply keystroke access.
Given the hotkey could be changed, keyboard-wide access makes the most sense -- would you really think it more "sane" to have to have a separate call and permission requests for each individual key, across apps?
Blame Discord for failing to communicate something that isn't a big deal, and hasn't been for the over 3 years this dialog has existed with it -- and worry more about what they're doing in the background, than Apple's APIs.
Er, yes? I'd expect it to be something like on the first run you get a prompt like "foo wants to read ctrl+a, ctrl+b, and ctrl+shift+c even when it's in the background; allow?", and reprompt on changes (so you'd tell the app to change it, and then confirm to the OS that you're okay with it). I'd also personally be happy with the OS initiating things with a single control panel that listed all apps that can listen and you tell the OS what keys should signal what apps and how, but that might be too complex to ask people to use.
> Blame Discord for failing to communicate something that isn't a big deal
In fairness, also very much this; every app should always explain every single permission it requests.