Initial keyboard handling.