1 /* 2 * Tlf - contest logging program for amateur radio operators 3 * Copyright (C) 2019 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 * Keystroke magic numbers and names as symbolic 22 * constants. Values are decimal ordinals provided 23 * by the ncurses library. See doc/keynames.txt. 24 * 25 *--------------------------------------------------------------*/ 26 27 #define CTRL_A 1 28 #define CTRL_B 2 29 #define CTRL_E 5 30 #define CTRL_F 6 31 #define CTRL_G 7 /* Bell */ 32 #define CTRL_H 8 /* Backspace */ 33 #define CTRL_I 9 /* Tab */ 34 #define CTRL_J 10 /* Newline/Linefeed */ 35 #define CTRL_K 11 36 #define CTRL_L 12 37 #define CTRL_M 13 /* Return */ 38 #define CTRL_N 14 39 #define CTRL_P 16 40 #define CTRL_Q 17 41 #define CTRL_R 18 42 #define CTRL_S 19 43 #define CTRL_T 20 44 45 /* Keyboard characters */ 46 #define ESCAPE 27 47 #define SPACE 32 48 #define BACKSLASH 92 49 #define DELETE 127 50 51 #define ALT_A 225 52 #define ALT_B 226 53 #define ALT_C 227 54 #define ALT_E 229 55 #define ALT_G 231 56 #define ALT_H 232 57 #define ALT_I 233 58 #define ALT_J 234 59 #define ALT_K 235 60 #define ALT_M 237 61 #define ALT_N 238 62 #define ALT_P 240 63 #define ALT_Q 241 64 #define ALT_R 242 65 #define ALT_S 243 66 #define ALT_T 244 67 #define ALT_V 246 68 #define ALT_W 247 69 #define ALT_X 248 70 #define ALT_Z 250 71 72 /* Common name macros. */ 73 #define TAB CTRL_I 74 #define LINEFEED CTRL_J 75 #define RETURN CTRL_M 76 77 #define SHIFT_F(n) (KEY_F(n) + 12) 78