I had made a console text editor, in which I had to detect ctrl+s to save the document. My code was something like this:
int d;
while(true){
if(_kbhit()){
d=_getch();
if(d==19){
// code for when ctrl+s is hit
}
// condition for other keys
}
}