Why don't you just use the event and directly react to it?
Depending on the requirements, this could be ideal. However in many cases at this point in the program you don't know which entities / gameobjects / nodes need to react to the control so it is required to store a "snapshot" of keys which can be polled during the individual objects update / control events.
In the system I presented above, the last keys pressed this frame are stored in Input::downKeys.
The keys released during last frame are stored in Input::upKeys
and the current keys held down are stored in Input::keys
(This is mimicking the same API that Unity 3D provides (as is the nature of this project ;))).
So to get the last 4 keys pressed, just iterate through the last 4 keys in the Input::downKeys array.
This approach is pretty much platform agnostic so for x-plane, just substitute event.key.keysym.sym with gChar in whatever bit of code you get the key down event.