1 /***************************************************************************
2  *  Pinfo is a ncurses based lynx style info documentation browser
3  *
4  *  Copyright (C) 1999  Przemek Borys <pborys@dione.ids.pl>
5  *  Copyright (C) 2005  Bas Zoetekouw <bas@debian.org>
6  *
7  *  This program is free software; you can redistribute it and/or modify
8  *  it under the terms of version 2 of the GNU General Public License as
9  *  published by the Free Software Foundation.
10  *
11  *  This program is distributed in the hope that it will be useful, but
12  *  WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  *  General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
19  *  USA
20  ***************************************************************************/
21 
22 #ifndef __KEYBOARD_H
23 #define __KEYBOARD_H
24 
25 /* escape or alt key */
26 #define META_KEY 0x1b
27 
28 /* adapted from Midnight Commander */
29 
30 /* macro to get CTRL+key sequence */
31 #define KEY_CTRL(x) ((x)&31)
32 /* macro to get ALT+key sequence */
33 #define KEY_ALT(x) (0x200 | (x))
34 #define is_enter_key(c) ((c) == '\r' || (c) == '\n' || (c) == KEY_ENTER)
35 
36 /***********************************/
37 
38 /* a structure, which holds the keybindings */
39 extern struct keybindings keys;
40 
41 #endif
42