IKeyTarget and keyboard support rewrite