PDA

View Full Version : How to send cursor keys using QProcess write?



clive
23rd June 2012, 21:15
Hi,

I have a QProcess running and I am sending key presses to the process using write. like this... myprocess->write("a");
This works fine.
How can I send a left or right cursor key using write?
Or for that matter can any non-printing key be sent using write?

Thanks.

Clive

wysota
23rd June 2012, 23:23
You can send any byte combination you want. The proper sequence can be found by learning about terminal protocols.

clive
24th June 2012, 00:15
I am sorry, I seem to have come to the wrong place.
I expected to get an answer to a question but instead I get a quiz. Seems to be a common theme when someone asks a question on here lately.

I am 60 years old and wrote my first application on a PET 2000 in 1978.
I have had a stroke since and my memory has suffered, I don't remember all the stuff I used to know and so I ask a question to perhaps get some help.

Don't bother answering the question, I will not be back. I will find another way of getting the information I need, it isn't that critical but some information on the correct codes would have helped me.
There was a time we all used to help each other. Maybe you would like to read about that somewhere.

wysota
24th June 2012, 01:58
Don't bother answering the question, I will not be back. I will find another way of getting the information I need, it isn't that critical but some information on the correct codes would have helped me.
There was a time we all used to help each other. Maybe you would like to read about that somewhere.

I don't have the correct code, this is a Qt forum, not a terminal emulator forum. I can probably google that out for you but then you can do it on your own as well, so I gave you directions what to look for. Considering the fact there are many terminal types available, it is likely I would have picked the wrong combination anyway without knowing any details which you didn't consider important enough to share.