clear keyboard buffer before initializing