Fix custom-key support for new modal feature and add some docs.