Results 1 to 4 of 4

Thread: How to send cursor keys using QProcess write?

  1. #1
    Join Date
    Mar 2007
    Posts
    16
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default How to send cursor keys using QProcess write?

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to send cursor keys using QProcess write?

    You can send any byte combination you want. The proper sequence can be found by learning about terminal protocols.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Mar 2007
    Posts
    16
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to send cursor keys using QProcess write?

    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.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to send cursor keys using QProcess write?

    Quote Originally Posted by clive View Post
    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Can't send a Ctrl-C to a QProcess (Win32)
    By Starbuck in forum Qt Programming
    Replies: 8
    Last Post: 31st March 2014, 21:41
  2. Write to QProcess from stdin
    By rajji_saini in forum Newbie
    Replies: 2
    Last Post: 24th October 2011, 18:45
  3. Replies: 1
    Last Post: 13th April 2011, 11:24
  4. QProcess plink.exe - how to process->write
    By Phalanx in forum Newbie
    Replies: 1
    Last Post: 25th February 2011, 09:40
  5. recieving QProcess::write data
    By node_ex in forum Qt Programming
    Replies: 3
    Last Post: 28th July 2008, 12:18

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.