Thanks for the helpful tips.
If you read the description in the code, you would see why I put it in the loop.
If you are familiar with the Windows OS you know that it can take it a while for it to detect a new keyboard.
So, My code loops in case is it missed the first time around.