Listen for enter and escape keys in modal

Enter and escape keys dismiss modal, with enter key saving changes and
escape key discarding them.

Fixes #1