Make undo/redo work in inline color editor by sending a key event.

This fixes #4989.