making an OpenGL "SIOUX"

hello yall, i am inquiring on how the best way to go abouts handeling i/o via streaming like cout / cin but running it through an text service in an OpenGL interface. now i know u can run SIOUX beside an window that has an openGL app going on, but i thought it would be an novel attempt at creating something kewl and very usable. does anyone have any ideas on the best ways for handeling input from the keyboard or mouse and then shoving it out to an openGL app via stream like cout << “” << …; and then handeling those ‘carage returns’ shifting text up or down. kind of like the quake terminal if u hit escape, any ideas i would be vey very greatfull.