things I tried already instead of ’ ’ (even if they don’t make sense…)
& # 32; (without spaces between characters)
32
" "
GLFW_KEY_SPACE
one thing that works is using <int> 32 instead of <char>.
This will work but only with the space. As I want to have flexibility to choose any other character I’d like to stick to <char>
I am a bit stuck and I could really use some help on this… maybe it’s easy?
Hi @arturo thanks for replying.
I tried both and none works… I c’d out the val just to understand what was going on and I get a flipped question mark as a cout…
cout << ofToString(settings.getValue<char>("//playButton")) <<endl;
I am keep on looking in this direction, in the meanwhile, if you have any other idea I am glad to try it out.
I am wondering if the problem is with my code and I don’t see it…?
I am posting the full code
if I use <![CDATA[ ]]>
I get nothing in the consolle, which may also be a space.
but what I found out now is that if I press Ctrl+ spacebar, it works…
I feel like we are almost there…
so that’s a space already, not sure why it won’t work with char instead of string but perhaps you can just use string and get the first char out of it unless it’s empty like;
Not sure I understand either.
It works the same way even just getting the [0]
It works on a ctrl+spacebar but not just spacebar, even if the out value is 32.
I’ll leave it like this for now, I’ll come back to it later.
if you come up with some idea, please post it and I’ll do the same.
if I call playButton = settings.getValue<string>("//playButton")[0];
or playButton = settings.getValue<string>("//playButton");
in both cases I get as cout 32
however in both cases the app doesn’t behave as it’s receiving 32 as, when I press spacebar, I get nothing.
It behaves correctly if I press ctrl+spacebar
I’ve no idea to be honest.
As I said, the test with another char y was working. I guess it’s a problem with this specific char 32… maybe?
I;m just guessing…
if there was something wrong with the code that wouldn’t work with other chars I think…
I also tried on another machine and keyboard… but same behaviour.
I don’t want to drive you crazy… I want to wait and see if I can come up with some idea…
there was a post on this forum that I read before, Crash on startup (_glfwPlatformGetVideoMode)
do you think that could be somehow related?