I was wondering wether there is a function that reads the keyboard buffer.
The problem is the following:
I have a program running through datafiles, analyzing them. If a certain condition is met I want to pause the program until a keyboard key is hit. Meanwhile I want to plot a histogram in a Canvas.
I was thinking about a pause function like this (very dirty, because its just a thought):
TCanvas *mycan = new TCanvas("p","t",5);
hist->Draw() // hist is defined elsewhere in this class
kbhit = kbbufferisfull() // this is the function that I am looking for
As you can see, I need a “kbbufferisfull()” function in order for this little function to work. Is there already something that does the job for me, that I was missing during my search? Or is there a better way to accomplish what I am trying to do?