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

Author Topic: KeyCodes missing...  (Read 3248 times)

0 Members and 1 Guest are viewing this topic.

zac

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
KeyCodes missing...
« on: August 05, 2008, 12:05:56 am »
Could you possibly offer a way to get the real raw scancodes/virtual key codes with flags like shift, alt, ctrl and so on, without further processing them to sf::Key::Codes? I am asking because shift+1 and all other numbers (expect 7 and 0) give me 0 as key code, and so do the german Umlauts and a lot of other keys with shift or ctrl pressed...

zac

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
KeyCodes missing...
« Reply #1 on: August 05, 2008, 12:28:00 am »
Okay, I found a place in SFML where I can install my own keymapping class... since my program is working with different localisations, including a language-file interpreter and c-locales (it is getting quite complex by now) this should be okay.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
KeyCodes missing...
« Reply #2 on: August 05, 2008, 02:45:49 am »
The key binding still needs to be improved, especially regarding local keyboard mappings.

So if you have an interesting generic implementation which can be better than the current one, don't hesitate to show me :)
Laurent Gomila - SFML developer

zac

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
KeyCodes missing...
« Reply #3 on: August 10, 2008, 02:35:56 pm »
I have, for myself, a fitting solution (including key-mapping files and so on), but I do not think this could be a solution for SFML in General.
The font seems not to support the €-Sign. Is that correct, or is that an problem with the encoding? The encoding (de-UTF8/other locales to C++-intern UCS-2) is realized via mbstowcs.
All other keys seem to work, including things like <,>,µ, ², ³, {, [, ], }, \,|,~,^,°,´,`, Ü,Ö,Ä,ß and so on...

The thing is OS-dependent (I will have to edit SFML for every locale I support, and I will have to add this functionality for both Windows and Linux), and I also need a key-mapping file for every language/locale I support.

prchakal

  • Full Member
  • ***
  • Posts: 142
    • View Profile
KeyCodes missing...
« Reply #4 on: December 11, 2008, 07:28:27 am »
Can anyone send me the correct keyboard mapping - source?