I think the suggestion of angel would be most fitting for my case. As angel said, the using the C code for D would be a relatively small refactor.

if you want to send like a synthetic arrow keystroke, well, things get ugly again, it will need to send the right series of bytes based on what terminal the program thinks you are.

Using arrow key etc. would be very beneficial for my case. So I thank Adam for his solution, but I prefer angel's one.

Thanks guys :)

Reply via email to