Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [Mac]sf::Keyboard::isKeyPressed(sf::Keyboard::Dash) not responding  (Read 5280 times)

0 Members and 1 Guest are viewing this topic.

kipbits

  • Newbie
  • *
  • Posts: 49
    • View Profile
[Mac]sf::Keyboard::isKeyPressed(sf::Keyboard::Dash) not responding
« 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.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: [Mac]sf::Keyboard::isKeyPressed(sf::Keyboard::Dash) not responding
« Reply #1 on: September 23, 2015, 08:12:43 am »
And what's the problem?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

kipbits

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: [Mac]sf::Keyboard::isKeyPressed(sf::Keyboard::Dash) not responding
« Reply #2 on: September 23, 2015, 01:24:49 pm »
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?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: [Mac]sf::Keyboard::isKeyPressed(sf::Keyboard::Dash) not responding
« Reply #3 on: September 23, 2015, 01:35:57 pm »
So your problem is that the key press doesn't get detected? (You never made that fully clear.)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

kipbits

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: [Mac]sf::Keyboard::isKeyPressed(sf::Keyboard::Dash) not responding
« Reply #4 on: September 23, 2015, 01:37:34 pm »
sorry for the confusion

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
SFML / OS X developer

kipbits

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: [Mac]sf::Keyboard::isKeyPressed(sf::Keyboard::Dash) not responding
« Reply #6 on: September 23, 2015, 01:55:58 pm »
standard english i think. I'm in the US

kipbits

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: [Mac]sf::Keyboard::isKeyPressed(sf::Keyboard::Dash) not responding
« Reply #7 on: September 27, 2015, 02:49:07 pm »
there seams to already be a thread on github for stuff like this: https://github.com/SFML/SFML/issues/7