I am making a chat program which (obviously) needs to detect the ascii of the key pressed.
Unfortunately I can get only the ascii of the "real" key pressed.
I don't know how to explain that, so here's an example:
when the user presses just <a>, SDL gives me the code 97 (which is the correct ascii code for "a")
if the user presses <SHIFT + a>, SDL again gives me 303 (the R-SHIFT code used by SDL) and again 97.
ok, I simply might recognize when the user presses shift, which is not a hard deal but...
if I have to check for non-alphabetical keys?
here is the complication, explained with a comparation:
italian user presses <9> : ascii code is 57
english user presses <9> : ascii code is 57
italian user presses <SHIFT + 9> : character is ")", ascii code is 41
english user presses <SHIFT + 9> : character is "(", ascii code is 40
I've already tried to implement a function which detects the input, but there happen some conflicts with SDL.
also my knowledge with low-level C coding is not good.
Which way should I start from? thanks
edit: I'd also be glad to make it portable
edit solved: ok, nevermind, I've just found the perfect solution: