I managed to solve this. I’m posting the solution in case it might help others.
There are two things to be done:
-
In order to open the device with permissions, Supercollider must be launched as root. I did it from the terminal with
sudo /Applications/SuperCollider/SuperCollider.app/Contents/MacOS/SuperCollider
. -
To be able to use the keyboard events, add Supercollider to Enable access for assistive devices in System Preferences > Security & Privacy > Privacy > Accessibility