Options to control the cursor on the terminal without ncurse

Hello all.

OS: QNX 6.4.1
Code: C

For my consolen-app it’s importend to have control of the cursor.
Of course, ncurses delivers functions for that, but it was so much work to recode my app to implement ncurses.

What options do I have features like getyx(int* y, int* x) and gotoyx(int y, int x)?

Thanks for help.

Best regards,


I’m pretty sure the console driver implements a serial protocol just like a dumb terminal. I forget the exact sequence but it is probably something like ESC ? # #. This should be somewhere in the docs, but if not, post again and I will look it up.

@ maschoen

Thanks for your reply.

I know, do you mean the docs of devc-con?

Sure, there are many options to control the cursor on the term, but what can I do if I want to save more than one position?
The commands {CSI s} and {CSI u} are to save and to restore the cursor, but no way to fill x and y variables with the coordinates.

I have 2 threads and they need to save his own positions for outputs.

What can I do?

devc-con might be a logical place for it, but I’m not sure where it is for QNX 6. It seems to be an ANSI terminal. You should be able to find the codes with google.

Please, can you give me an example?

An example of what?

How to use the commands for save and restore cursor position.
I have difficulties to understand it.

Thank you.