I don't know exactly hod delphiX input works but I've noticed a small thing with SDL keboard events(or events in general). If I just put them in a cycle or a 0 timer I get ~95% CPU killer. It's because the cpu tries to check as fast as possible even if the hardware isn't capable of such speeds. As soon as I added a delay of 1 millisecond it went back to nice 2%.

Oh and yes using a nicely built queue class is probably the best solution.