keyup,keydown是键盘消息,而char是windows消息。windows根据keyup和keydown来生成char消息。
建议你使用模拟键盘输入,好像是SendInput。你差一下WinApi。