Fix SDL input bug

Fixes #8084 - I guess this applies only to SDL builds?

This probably comes from 3bc3ba8085d2b6ec7f6c83fff5a9d223b7a9a98c

The input system allows to enter any Unicode character by holding the Alt-key down (left or right, doesn't matter) and entering the number of the Unicode character (in decimal). Is that feature even used by someone? This interfered with input involving the Alt Gr key. Should be fixed hereby.

Additionally (second commit) fix some signed comparison warnings.