More robust calling of keyboard handlers.