Add support for replacing the default keyboard grab.