+
+ /*
+ * Get the terminfo entry into memory, and tell ncurses that we want to
+ * use function keys. That will make it add any user-defined keys that
+ * appear in the terminfo.
+ */
+ newterm(getenv("TERM"), stderr, stdin);
+ keypad(stdscr, TRUE);
+ endwin();
+
+ for (n = -1; n < KEY_MAX + 512; n++) {
+ const char *result = keyname(n);