Add option to disable passing unhandled keys to the underlying page

This resolves #1287.