It seems an SDL bug has been hit, just pushing a lot of the keys on my keyboard reveal that they are not working and this gets spammed to the console:
The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL mailing list <sdl@libsdl.org> X11 KeyCode 175 (167), X11 KeySym 0x1008FF1C (XF86AudioRecord).
The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL mailing list <sdl@libsdl.org> X11 KeyCode 176 (168), X11 KeySym 0x1008FF3E (XF86AudioRewind).
The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL mailing list <sdl@libsdl.org> X11 KeyCode 177 (169), X11 KeySym 0x1008FF6E (XF86Phone).
The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL mailing list <sdl@libsdl.org> X11 KeyCode 178 (170), X11 KeySym 0x0 ((null)).
The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL mailing list <sdl@libsdl.org> X11 KeyCode 182 (174), X11 KeySym 0x1008FF56 (XF86Close).
The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL mailing list <sdl@libsdl.org> X11 KeyCode 183 (175), X11 KeySym 0x0 ((null)).
The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL mailing list <sdl@libsdl.org> X11 KeyCode 184 (176), X11 KeySym 0x0 ((null)).
The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL mailing list <sdl@libsdl.org> X11 KeyCode 185 (177), X11 KeySym 0x1008FF78 (XF86ScrollUp).
The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL mailing list <sdl@libsdl.org> X11 KeyCode 186 (178), X11 KeySym 0x1008FF79 (XF86ScrollDown).
The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL mailing list <sdl@libsdl.org> X11 KeyCode 187 (179), X11 KeySym 0x28 (parenleft).
The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL mailing list <sdl@libsdl.org> X11 KeyCode 188 (180), X11 KeySym 0x29 (parenright).
The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL mailing list <sdl@libsdl.org> X11 KeyCode 189 (181), X11 KeySym 0x1008FF68 (XF86New).
That is not an exhaustive list, but for some reason SDL seems to be doing something very stupid. In essence it is mapping ‘known’ keys to its own platform independent mapping, however it then does something very stupid, for keys it does not know it does not pass them on as some type of ‘UNKNOWN’ key with a platform dependent additional value (thus gamers could map them to functions by pressing them, regardless of if we know what they are or not). Any way this could be working around? Other input libraries I use handle unknown keys just fine by doing what I just described that SDL should do (technically the Input systems I often use do something like give you an integer value of the key (with a set of DEFINE’s for mapping known keys) and the known keys fall within 0 to (2^15)-1, and ‘unknown’ keys are mapped to the upper range of 2^15 to (2^16)-1, thus known keys you can treat as normal, but unknown keys are still useful. Unknown keys are basically just the platform dependent integral value mapped to that range so the same mappings will always end up the same on any given computer, but different computers may map different depending on hardware. Thus this method makes sense.
Ignoring them, however, does not make sense. Many keys on my keyboard as well as some of my testers keyboards are not functioning, they just spew those above messages.
Also, I have not finished going through the API yet, but I am not immediately seeing a way to get multiple input devices. For example, I want to map keys on both the main keyboard (which maps to keyboard 0) and keys on my glove (which maps to keyboard 1) to different functions, but how do I determine which input devices they come from (a standard functionality of other input systems I use).
If the first issue is not fixable (should be easily fixable) and the second does not exist (also easily fixable) then how would I hook the platform dependent input loop events so I can handle them manually as there are simple ways of doing all the above on all windows, mac, linux, and yes, even android (maybe iOS? Does it even support external controlling devices like Android? Never programmed for iOS…).
EDIT: I love the component design, very convenient.