Apple’s Worldwide Developers Conference to kick off June 10 at 10 a.m. PDT with Keynote address

The Keynote will be available to stream on apple.com, the Apple Developer app, the Apple TV app, and the Apple YouTube channel. On-demand playback will be available after the conclusion of the stream.

No keyboard input when running a C++ program in Xcode

I'm running a C++ program, with SFML, in Xcode.

The program runs fine, but it will not accept any keyboard input, only mouse input.

This is the log message I get:

------------------------------------------------------------------------

2023-07-28 08:34:57.788612+1000 Computer Simulation Part A Stage 2[905:20518] Metal API Validation Enabled


The requested video mode is not available, switching to a valid mode


2023-07-28 08:35:05.053946+1000 Computer Simulation Part A Stage 2[905:20518] [default] 0x1000009f5: TCC deny IOHIDDeviceOpen


2023-07-28 08:35:05.054411+1000 Computer Simulation Part A Stage 2[905:20518] [default] 0x1000009f5: TCC deny IOHIDDeviceOpen


We got a keyboard without any keys (1)


Message from debugger: Terminated due to signal 15

----------------------------------------------------------------------


How can I solve this problem?

Mac mini, macOS 13.4

Posted on Jul 27, 2023 4:01 PM

Reply
7 replies

Jul 27, 2023 7:22 PM in response to MrHoffman

Solved - to some extent.

I changed the Product Name in the Xcode Build Settings to 'Terminal' (see below).

Then when I ran the program from Xcode, I was prompted to give permission to the Terminal, which I did (see below).


It then worked. At least until I made any changes to the C++ program, at which point it stopped working. I then had to delete the Terminal permission and redo it again to get it working.

But oddly, if I returned the C++ program changes I had made, back to what they were originally, it worked straight away without having to do the permission again.

So anyway, this is not really a fix if I have to redo the permission every time I make a change to the C++ program. But hopefully what I've posted here, might help someone find a permanent solution to this problem.


Thanks for your help - it pointed me in the right direction.


No keyboard input when running a C++ program in Xcode

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.