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

Author Topic: sf::Keyboard::Enter ?  (Read 19277 times)

0 Members and 1 Guest are viewing this topic.

netrick

  • Full Member
  • ***
  • Posts: 174
    • View Profile
sf::Keyboard::Enter ?
« on: August 17, 2012, 10:48:08 pm »
Hi.
I'm writing input for my game right now, everything worked perfectly till I wanted to bind one action to enter key... Why  sf::Keyboard::Enter doesn't exist? Documentation says nothing about it, compilator doesn't see it either. Why? I think it's rather important feature to be able to receive "enter" key status. Or maybe there it is implemented but it's not in documentation?

Thanks

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: sf::Keyboard::Enter ?
« Reply #1 on: August 17, 2012, 10:52:20 pm »
It's just called diffrently, I myself would've prefered the name 'Enter' aswell but 'Return' is also quite common. ;)

sf::Keyboard::Return
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

netrick

  • Full Member
  • ***
  • Posts: 174
    • View Profile
Re: sf::Keyboard::Enter ?
« Reply #2 on: August 17, 2012, 10:59:08 pm »
Lol, I would never think that return is the enter key. I think it isn't good KISS-type intuitive naming with that key, but good to hear it at least exist. Well, the lib is so good that it doesn't matter.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: sf::Keyboard::Enter ?
« Reply #3 on: August 17, 2012, 11:11:59 pm »
I think it isn't good KISS-type intuitive naming with that key.
This has nothing to do with KISS or anything, it's just your intuition and your custom, from the history 'Return' is the right name since it returned the typewriter carrier back to the beginning of the line. The 'Enter' key was introduced later on and some keyboard layouts treated them as diffrent keys for diffrent spacing, but it was always the 'Return' key which occupied the place where you find todays return/enter key (see this wikipedia article). ;)
« Last Edit: August 17, 2012, 11:13:39 pm by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

netrick

  • Full Member
  • ***
  • Posts: 174
    • View Profile
Re: sf::Keyboard::Enter ?
« Reply #4 on: August 17, 2012, 11:20:46 pm »
Isn't KISS related to intuition in some way ;)? Well of course it is correct name, but I mean 90% of people (especially non-native english speakers) just never ever use "return name", most of them doesn't even know what is return key. Historically it was return, but these days it is basically known as enter I'd say. I am yet to see keyboard with "return" name on that key. Or a game/application that says "press return to open chat". Anyway, it doesn't matter. Return is okay name, enter just in my opinipn would be a bit more intuitive.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: sf::Keyboard::Enter ?
« Reply #5 on: August 18, 2012, 12:59:01 am »
Isn't KISS related to intuition in some way ;)?
Yes but not to your personal intuition. ;)

Well of course it is correct name, but I mean 90% of people (especially non-native english speakers) just never ever use "return name", most of them doesn't even know what is return key. Historically it was return, but these days it is basically known as enter I'd say. I am yet to see keyboard with "return" name on that key. Or a game/application that says "press return to open chat". Anyway, it doesn't matter. Return is okay name, enter just in my opinipn would be a bit more intuitive.
This is again just your opinion and your made up numbers (90%) (unless your God and know how everyone is thinking and how their knowledge level of 'return' is). ;D
Fact is that many keyboard layouts don't write down Enter or Return but just leave the edged back arrow on the key. Another fact is that mostly all Apple keyboards have the return naming (I think they still handle Enter and Return diffrently).

It just boils down to personal preferences and from my point of view I haven't seen Enter being way more used than Return and thus I feel like they're equal but as I said in the first post if it was my decision I'd probably also choose Enter. :)
« Last Edit: August 18, 2012, 01:01:14 am by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything