Clearing the keyboard buffer in SDL

Hi!

I’ve been using SDL for an application I’m working on, and it’s going very well! Tons of great libraries to use.

I’m having a problem with the keyboard. There is a keystroke to launch an ‘external editor’, and the program is halted until the external editor is finished
(it is a shell launch in Windows). The only problem is, when I come back in, the keys pressed just before the editor was launched, end up in the SDL app.

Is there a way, in SDL, to clear the keyboard buffer after the shell launch is finished?

Cheers,

Jeremy.