/* Description: This program outputs the keycode that Vermont Views sees from the keyboard. Terminal systems: Under terminal systems, if a key is pressed that doesn't have a mapping to a mnemonic in the vvtermcap file, we will output the raw escape sequence. This is useful for those that wish to enhance an existing termcap entry or when trying to build a termcap entry for a new terminal. */ #include #include int main() { int key = 1; vv_init(); printf ("Press keys to see what is input. Press 'q' to quit.\n"); while (key != 'q') { key = ki(); printf("The key pressed was: %d\n", key); } vv_exit(); return(1); }