Initial keyboard input code