Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Issues with Keyboard Input Monitoring after Updating to macOS Catalina  (Read 3991 times)

0 Members and 1 Guest are viewing this topic.

Alexander

  • Newbie
  • *
  • Posts: 1
    • View Profile
I recently upgraded to macOS Catalina (Version 10.15.2) and am now having issues with recognizing keyboard events. I am working in Xcode (Version 11.3) and receive the following error after building and running my project, and attempting to move a sprite with the arrow keys:

TCC deny IOHIDDeviceOpen
We got a keyboard without any keys (1)

If I go into 'System Preferences > Security & Privacy > Input Monitoring' and whitelist the .app that I build, it temporarily fixes the issue. But the second I change the source code and recompile, it stops recognizing keyboard inputs. Toggling the 'Input Monitoring' privileges fixes it for the current build, but this is annoying and I don't want to have to toggle this on and off every time I change the source code :-\

Has anyone else encountered this issue and/or found a solution?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Issues with Keyboard Input Monitoring after Updating to macOS Catalina
« Reply #1 on: January 11, 2020, 04:37:37 pm »
If you actually use events and not real-time input (sf::Keyboard::IsKeyPressed), then things should work fine.

For real-time input you will have to grant the app input monitoring privileges as far as I know, that's one of the major changes in Catalina for all applications.
There are ways to disable some stuff for developers, but as I am not a macOS user, I don't really know and would need to research myself.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything