created visualizing code for isOnKeyboard