If you look at the example and try to understand it, it's starting the loop, taking a 250ms pause, then waiting for a key press. If the key press matches then it'll give you pop up msgbox and then it'll exit the loop, therefore it'll only run once.