send keyboard input to the selected window.