Introduce simple window system agnostic method for checking keyboard modifers (shift/control/alt). Fixed couple of warnings and clang errors.

Signed-off-by: Steven Lovegrove <stevenlovegrove@gmail.com>