SFML community forums
Help => Window => Topic started by: kipbits on September 22, 2015, 10:28:26 pm
-
Hello all, this will be my first post here. I'm trying to get my keyboard input working properly, and I ran into a problem with the dash/underscore key. I've downloaded 2.3.2 and I'm pretty sure I have it installed in the right location, but I'm still getting a problem with the dash/underscore key. I wrote a little test, the "A" and "=" are working, but not dash:
#include <iostream>
#include <SFML/Audio.hpp>
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
int main(){
while (true){
if(sf::Keyboard::isKeyPressed(sf::Keyboard::A)){//1
std::cout << "aA\n";
}
if(sf::Keyboard::isKeyPressed(sf::Keyboard::Dash)){// error???
std::cout << "-dash-\n";
}
if(sf::Keyboard::isKeyPressed(sf::Keyboard::Subtract)){// error???
std::cout << "-minus-\n";
}
if(sf::Keyboard::isKeyPressed(sf::Keyboard::Equal)){
std::cout << "=\n";
}
}
return 0;
}
I'm using a macbook pro with yosemite, and no extended keyboard, I hope that makes it clear.
-
And what's the problem?
-
hyphen(dash) still seams not to work, I've downloaded version 2.3.2, and placed frameworks and dependencies in /Library/Frameworks. I'm still having the problem with dash. any ideas? I've test the whole alphabet and numbers, and this is the only key that doesn't work. are any other mac users having this problem?
-
So your problem is that the key press doesn't get detected? (You never made that fully clear.)
-
sorry for the confusion
-
Probably because of https://github.com/SFML/SFML/blob/master/src/SFML/Window/OSX/HIDInputManager.mm#L858
What's you kb layout?
-
standard english i think. I'm in the US
-
there seams to already be a thread on github for stuff like this: https://github.com/SFML/SFML/issues/7