C++ SFML We got a keyboard without any keys (1)

I am trying to run a simple c++ SFML program that displays a sprite to a window and lets you control it with WASD. When I run the program, there are no error messages and it loads up the sprite in the window but I can't move the sprite. In the output stream this message pops up: "2020-03-29 16:30:08.861016-0700 TASp11p01[1195:32604] Metal API Validation Enabled 2020-03-29 16:30:08.897117-0700 TASp11p01[1195:32953] flock failed to lock maps file: errno = 35 2020-03-29 16:30:08.897876-0700 TASp11p01[1195:32953] flock failed to lock maps file: errno = 35 2020-03-29 16:30:09.049797-0700 TASp11p01[1195:32604] [default] 0x100000406: TCC deny IOHIDDeviceOpen 2020-03-29 16:30:09.050274-0700 TASp11p01[1195:32604] [default] 0x100000325: TCC deny IOHIDDeviceOpen 2020-03-29 16:30:09.050374-0700 TASp11p01[1195:32604] [default] 0x100000406: TCC deny IOHIDDeviceOpen We got a keyboard without any keys (1) 2020-03-29 16:30:09.050475-0700 TASp11p01[1195:32604] [default] 0x100000325: TCC deny IOHIDDeviceOpen We got a keyboard without any keys (1)" I have no idea what this means. I have tried restarting my computer, restarting XCode, and cleaning the build but nothing has worked. Please help!!

I have the same error. You have to click on: Products > [name of your program] with control or left click > click on "Show in Finder" > click on your program. Then it runs in the Terminal.
I hade the same Issue while I was using CLion. I found this issue was caused by Security Options of MacOS. I had to enable this in System Preferences --> Security Options --> (tab) Privacy --> Input Monitoring --> Add here your Application (in my case Clion)

I didn't try run the app directly from the terminal ./yourApp but I think the Security option mentioned can help you.

C++ SFML We got a keyboard without any keys (1)
 
 
Q