Is it possible using wmctrl to send keystrokes to a window? I know it's possible by using xdotool. Both tools are very similar, so maybe I missed something when I read the man pages for wmctrl.
Sending key with wmctrl
wmctrl
No, wmctrl doesn't have ability to send keystrokes in the sense of typing out letters and key combinations. There is -c flag for closing window, which can be used to emulate Ctrl+F4 for closing a window, but that's a stretch of reasoning. You can combine those, of course, although wmctrl refers to window XIDs in hexadecimal format,so you may have to make conversion between those. xdotool alone, however, is sufficient to send keystrokes to specific windows.