Better keyboard handling.