Stricter type checks.

The following types have been added and they are used in place of arbitrary int
values: Key, Action, Mod, MouseButton, Joystick, InputMode and CursorMode.