SFML community forums

Help => System => Topic started by: mtvee on November 20, 2020, 01:53:23 pm

Title: We got a keyboard without any keys (1) (OSX Big Sur)
Post by: mtvee on November 20, 2020, 01:53:23 pm
I get this error "We got a keyboard without any keys (1)" all of a sudden after upgrade to Big Sur. I was going to put up a report on github but thought i would post here first incase I am doing something dumb or this is a known thing.

This happens with my code and the SFML example code as well so I didn't bother making a minimal example

System is:

macOS Big Sur 11.0.1
MacBook Air

SFML 2.5.1 built from source with cmake and default install

edit: here's a gist with minimal example https://gist.github.com/mtvee/e82ef146e7f1ef6c816e27d7a16a7a79

edit: if anyone can verify this one way or the other i would be grateful so I know where to dig. thanks!


edit: i think i got this pegged as some cruft from the Big Sur upgrade and not SFML. Apologies for the noise.
Title: Re: We got a keyboard without any keys (1) (OSX Big Sur)
Post by: eXpl0it3r on November 23, 2020, 03:37:50 pm
Just to confirm, yes, SFML works fine on Big Sur. :)

Keep in mind that since macOS Catalina, you'll get a popup at start, that requires keystrokes permission whenever you're using sf::Keyboard::isKeyPressed(). If you just use events, then you don't need to provide that permission.

(https://i.imgur.com/MR18ytK.png)

The message you mentioned does originate from SFML (https://github.com/SFML/SFML/blob/59df9d0d887f11724679f2c99dec0f05d6caeaf4/src/SFML/Window/OSX/HIDInputManager.mm#L188), but not sure why you'd run into this on your end.
Title: Re: We got a keyboard without any keys (1) (OSX Big Sur)
Post by: mtvee on November 25, 2020, 04:41:16 pm
I don't know why it happened. I wiped and reinstalled everything and it magically went away. Old libs, link one lib, use another at runtime? Sometimes cmake does weird things with caches and such too. Also using Clion and these IDEs are handy but sometimes you're never really sure what they are doing back there. Who knows? Sorry for noise. I should have just wiped it from the start.
Title: Re: We got a keyboard without any keys (1) (OSX Big Sur)
Post by: achpile on December 29, 2020, 04:53:10 pm
I just faced this issue. If you run app from terminal - go to Security settings -> Then something with keyboard icon, then in the list mark the checkbox (terminal). And it should work fine. SFML is not the issue, it's MacOS's "feature"