The command KEYSTACK ! used to clear the keyboard buffer in pre-v9 JP shells. Now it doesn't. I notice that the help page for KEYSTACK has the bang in the "Format" line and mentions that it's "allowed outside the quotes," but doesn't actually say what it does. So presumably, you already know that it no longer works, and have mostly-but-not-completely removed it from the documentation...?