Close modal when ESC key pressed

Both landing page and settings page modals can be closed via the ESC key.

Not optimal to duplicate the function, but it's also not optimal to create a shared script just for the one function.

There is a lot of duplicate logic that the landing page and settings page could share and a refactor is on the way, but until then we can add this in to get that ESC key working.