SDLHost: Fixing Segfault caused by wrong handling in huge SDL keycodes

Keycodes of keys without character representation are bigger than 0x40000000 (see http://wiki.libsdl.org/SDLKeycodeLookup). And keycodes in SDL2 are more than 258. 

This fix translates huge keycodes into minor ones, and extends the key storage array from 258 to 512.