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

Author Topic: Extend keyboard input keys  (Read 2392 times)

0 Members and 2 Guests are viewing this topic.

Elgan

  • Jr. Member
  • **
  • Posts: 77
    • AOL Instant Messenger - Flat+1,+17+st+Cl
    • View Profile
Extend keyboard input keys
« on: February 11, 2012, 10:01:19 pm »
Hey everyone.

I would like to add some keys, namely the ` key

that's the little one next to the 1 key, `

As I would like it for my console bind, all my keys have a custom bind system, but that key I really miss having for console.

TechRogue

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Extend keyboard input keys
« Reply #1 on: February 11, 2012, 10:33:19 pm »
SFML 1.x:
Code: [Select]
sf::Key::Tilde
SFML2:
Code: [Select]
sf::Keyboard::Tilde

Elgan

  • Jr. Member
  • **
  • Posts: 77
    • AOL Instant Messenger - Flat+1,+17+st+Cl
    • View Profile
Extend keyboard input keys
« Reply #2 on: February 11, 2012, 11:29:47 pm »
noo..not the Tilde key

tilde is ~ , unless I'm mistaken ? ill try again.


¬` that key

edit:

ACTUALLY...


Game.AddKeyBind(INPUTTYPE_KEYBOARD,"togglemenu console", sf::Keyboard::Tilde);


Just noticed: sf::Keyboard::Tilde ....is patched to @' on my keyboard.

every other key ive tried maps fine.

sf::Keyboard::Tilde .. shouldn't it be #~...Which is the key to the right.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Extend keyboard input keys
« Reply #3 on: February 12, 2012, 09:36:22 am »
Key mapping is not perfect, it will be improved in the future.
Laurent Gomila - SFML developer

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Extend keyboard input keys
« Reply #4 on: February 12, 2012, 03:17:57 pm »
In 2.0? It's even quite buggy at the moment, as many keys are mapped to A (on my machine (QWERTZ, Linux) caps lock and some others; can try it out again if you need the exact keys).