tweak for rich text with new keyboard events