This code used a keyboardState size of 256 and indexed it with a retro_key, which can be any value (RETROK_RALT is 307). This fixes that by using RETROK_LAST as the array size. Should fix #6322.