I've got a serious problem with my input code. It's only just come to light and frankly, it's embarrasing. But we're all friends here so I'll tell you my dirty little secret.

Using the KeySym and Modifiers, I cannot seem to get the values for things like the @ symbol or the " symbol..

All of the examples I've seen seem to be based in the USA and appear to just hack the [KMOD_LSHIFT]+ [SDLK_2] to give [SDLK_AT] which will only work on a US style keyboard. There appears to be no intelligence in the SDL C code to determine the locale the user is in and their keyboard settings. It just seems to map directly (I might have missed something)

This is most annoying.

Does anyone have a tried and tested, internationally accepted way to get the correct keyboard code from an international keyboard, regardless of locale? I want the Real key the user has pressed.

I need to know when someone's typed john.smith@someaddress.com and at the moment, my assumption that the @ key was on the ['] key (UK Keyboard) was dead wrong!..

I've had to hack my code to retrieve an @ symbol on both [shift]+['] and [shift]+[2] keys.. This is also wrong, but at least it catches more people than the UK version.

Thanks for any help, anyone.