Hmm alright, ye seems really weird that it wouldn't be able to simulate keyboard inputs toh.. I were able to set the actual caption using
SendMessage(hwnd, WM_SETTEXT, 0, L"random");
if i recall, something along those lines atleast and that would change the window name from "COM3 - Tera Term VT" to "random".
This is how the application looks, i do not know if it helps but it is almost like a bios window, only that it is an application:
https://imgur.com/a/Ka1qkgU
I also tried to play around with the spy tool from visial studio to locate hidden handles, but that did not work either. Seems like it is only one handle which is the main window itself retrieved from
FindWindowA(NULL, "COM3 - Tera Term VT")
-------------------------------------------------------------------------------------------------
Edit:
Also, this block of code outputs 1 aswell, so the PostMessage is being processed..
BOOL k = PostMessage(hwnd, WM_KEYDOWN, VK_DOWN, 0);
cout << k << endl;