Getting CTRL characters with NCurses

view story

http://stackoverflow.com – How are control keys obtained from the NCurses library? I need to know if a result from getch () is a character pressed with ctrl, and what character was pressed with it. I googled "ctrl keys ncurses" and "control keys ncurses" without much results. I know from a quick test that (at least in my case) all the CTRL characters are related to the characters by a difference of 96. ie akey is 97 ^Akey is 1 bkey is 98 ^Bkey is 2 ckey is 99 ^Ckey is 3 But this doesn't seem like reliable information to write a program with. Does anyone know a way of doing this? (HowTos)