1 /*
2  * Tlf - contest logging program for amateur radio operators
3  * Copyright (C) 2015 Nate Bargmann <n0nb@n0nb.us>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  */
19 
20 
21 /* Collate the macro test boilerplate into this file and then
22  * include this file into the Tlf source files that need [n]curses.h
23  * functions.
24  */
25 
26 #ifndef TLF_CURSES_H
27 #define TLF_CURSES_H
28 
29 #include <config.h>
30 
31 #if defined HAVE_NCURSESW_CURSES_H
32 # include <ncursesw/curses.h>
33 #elif defined HAVE_NCURSESW_H
34 # include <ncursesw.h>
35 #elif defined HAVE_NCURSES_CURSES_H
36 # include <ncurses/curses.h>
37 #elif defined HAVE_NCURSES_H
38 # include <ncurses.h>
39 #elif defined HAVE_CURSES_H
40 # include <curses.h>
41 #else
42 # error "SysV or X/Open-compatible Curses header file required"
43 #endif
44 
45 
46 /* Additional key codes reported by Gnome Terminal and Xterm
47  * and apparently in the terminfo database but not in Ncurses header files.
48  *
49  * The following keys are defined in the xterm terminfo database.
50  * Key names with a suffix of '3' are Alt-key combinations.
51  * Key names with a suffix of '5' are Ctl-key combinations.
52  *
53  * Keys are defined in decimal ordinal order.
54  */
55 #define kDC5	519	/* Ctrl-Delete */
56 #define kDN3	523	/* Alt-Down arrow */
57 #define kDN5	525	/* Ctrl-Down arrow */
58 #define kEND3	528	/* Alt-End */
59 #define kEND5	530	/* Ctrl-End */
60 #define kHOM3	533	/* Alt-Home */
61 #define kHOM5	535	/* Ctrl-Home */
62 #define kIC5	540	/* Ctrl-Insert */
63 #define kLFT3	543	/* Alt-Left arrow */
64 #define kLFT5	545	/* Ctrl-Left arrow */
65 #define kNXT3	548	/* Alt-Page Down */
66 #define kNXT5	550	/* Ctrl-Page Down */
67 #define kPRV3	553	/* Alt-Page Up */
68 #define kPRV5	555	/* Ctrl-Page Up */
69 #define kRIT3	558	/* Alt-Right arrow */
70 #define kRIT5	560	/* Ctrl-Right arrow */
71 #define kUP3	564	/* Alt-Up arrow */
72 #define kUP5	566	/* Ctrl-Up arrow */
73 
74 #endif
75