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

Author Topic: Keyboard options / customisation ?  (Read 1845 times)

0 Members and 1 Guest are viewing this topic.

binbinhfr

  • Newbie
  • *
  • Posts: 21
    • View Profile
Keyboard options / customisation ?
« on: April 22, 2020, 10:29:06 am »
Hi there,

I read many posts, but I still don't figure out how to implement a keyboard customisation in my game... (allowing for example AZERTY / QWERTY users to remap keys like QSDZ and WASD).

More than that, some keys are not recognized (like ! exclamation or ² or §)
Is there a way to extend/override this list from my game ?
https://www.sfml-dev.org/documentation/2.5.1/classsf_1_1Keyboard.php

I saw that Laurent was looking at that a few years ago, but is there any news on this side ?

binbinhfr

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Keyboard options / customisation ?
« Reply #1 on: April 22, 2020, 02:39:05 pm »
Infact eXpl0it3r gave me a good answer in another thread, so I share :

Custom keyboard bindings are already possible now, you have to make the key detection code variable or use something like Thor's Action.
Please open a separate topic if you want to discuss your specific situation.

Regarding the scancode situation, I've been very slowly working on getting the scancode implementation consolidated. I'll be doing some additional analyzes to see what is still needed.
You can follow the open PR here: https://github.com/SFML/SFML/pull/1235