At this moment you can only poll events from the top of the stack. Being a stack means last in first out, however this isn't always satisfactory as in some situations it is preferred to pop events in the same order they occurred. For instance if my application freezes for a split second and the user doesn't notice and taps these keys in this exact order: "X Y Z" the following happens. The application unfreezes and it starts taking events from the top meaning it will see "Z Y X" instead of "X Y Z".
There are workarounds like Acrobat suggested. However when I poll events I can only poll one at the time, meaning that while I'm polling another event can be added on the stack and ruin my event reading (because of polling the event I want I will be polling the new one). For instance "X Y Z" is the event stack with Z on the top, I poll two events and get "Z Y" then the a new event happens (event "A"). At this point the stack is "X A" and the reading queue "Z Y", I continue reading until the stack is empty (another issue, what if the stack can never be empty because something is continuously generating events?) and get my reading queue like this "Z Y A X" and what I want is "Z Y X A". More to that, a pass through the stack will mean Θ(n) steps to get an inverted order (assuming no events are added on the stack in the mean time), and Ω(n log n) for worst case sorting.
What I'm asking is: can there be a method that will take from the base of the stack (actually turn it into a queue) without having to go through the whole stack (from top to bottom)? This will solve the issues mentioned above and reduce the time to Θ(1) for getting the first in event.