Keyboard handling and enhancements