Hi eXpl0it3r.
As the SFML don't have this brazillian keys, i fixed this in the SFML source code in Linux. I hope you guys from the project can add it on the next version.
I found the X11 keys and I discover that keys are dead keys (don't know what does this mean).
Then I go on the file
include/SFML/Window/Keyboard.hpp and I add this:
//here the add begin
cCedilla,
grave,
acute,
circumflex,
tilde,
macron,
breve,
abovedot,
diaeresis,
abovering,
doubleacute,
caron,
cedilla,
ogonek,
iota,
voicedSound,
semivoicedSound,
belowdot,
hook,
horn,
//here the add end
KeyCount, ///< Keep last -- the total number of keyboard keys
And I go on the file
src/SFML/Window/Unix/WindowImplX11.cpp and I add this code in function
keysymToSF:
case XK_9: return sf::Keyboard::Num9;
//Here the add begin
case XK_ccedilla: return sf::Keyboard::cCedilla;
case XK_cedilla: return sf::Keyboard::cedilla;
case XK_dead_grave: return sf::Keyboard::grave;
case XK_dead_acute: return sf::Keyboard::acute;
case XK_dead_circumflex: return sf::Keyboard::circumflex;
case XK_dead_tilde: return sf::Keyboard::tilde;
case XK_dead_macron: return sf::Keyboard::macron;
case XK_dead_breve: return sf::Keyboard::breve;
case XK_dead_abovedot: return sf::Keyboard::abovedot;
case XK_dead_diaeresis: return sf::Keyboard::diaeresis;
case XK_dead_abovering: return sf::Keyboard::abovering;
case XK_dead_doubleacute: return sf::Keyboard::doubleacute;
case XK_dead_caron: return sf::Keyboard::caron;
case XK_dead_cedilla: return sf::Keyboard::cedilla;
case XK_dead_ogonek: return sf::Keyboard::ogonek;
case XK_dead_iota: return sf::Keyboard::iota;
case XK_dead_voiced_sound: return sf::Keyboard::voicedSound;
case XK_dead_semivoiced_sound: return sf::Keyboard::semivoicedSound;
case XK_dead_belowdot: return sf::Keyboard::belowdot;
case XK_dead_hook: return sf::Keyboard::hook;
case XK_dead_horn: return sf::Keyboard::horn;
//here the add end
}
With this code, the events return the code of the key and not -1.
Thanks for the help.
PS: I merge two cedilla in one because one is dead and another is not. It's because I don't know hou SFML will have it in the future. I think my keyboard shoud use it but it use's the cCedilla (cedilla in the C letter).
I hope you can fix it creating two different cedillas.