4 #include "mouse.h" /* Gpm_Event */
7 void init_key_input_fd (void);
10 int get_event (Gpm_Event
*event
, int redo_event
, int block
);
14 /* Possible return values from get_event: */
20 * Internal representation of the key modifiers. It is used in the
21 * sequence tables and the keycodes in the mc sources.
23 #define KEY_M_SHIFT 0x1000
24 #define KEY_M_ALT 0x2000
25 #define KEY_M_CTRL 0x4000
26 #define KEY_M_MASK 0x7000
28 extern int double_click_speed
;
29 extern int old_esc_mode
;
30 extern int irix_fn_keys
;
31 extern int use_8th_bit_as_meta
;
33 /* While waiting for input, the program can select on more than one file */
35 typedef int (*select_fn
)(int fd
, void *info
);
37 /* Channel manipulation */
38 void add_select_channel (int fd
, select_fn callback
, void *info
);
39 void delete_select_channel (int fd
);
40 void remove_select_channel (int fd
);
42 /* Activate/deactivate the channel checking */
43 void channels_up (void);
44 void channels_down (void);
46 /* Abort/Quit chars */
47 int is_abort_char (int c
);
48 int is_quit_char (int c
);
50 #define XCTRL(x) (KEY_M_CTRL | ((x) & 31))
51 #define ALT(x) (KEY_M_ALT | (unsigned int)(x))
53 /* To define sequences and return codes */
54 #define MCKEY_NOACTION 0
55 #define MCKEY_ESCAPE 1
57 /* Return code for the mouse sequence */
58 #define MCKEY_MOUSE -2
60 int define_sequence (int code
, char *seq
, int action
);
62 /* internally used in key.c, defined in keyxtra.c */
63 void load_xtra_key_defines (void);
65 /* Learn a single key */
66 char *learn_key (void);
68 /* Returns a key code (interpreted) */
69 int get_key_code (int nodelay
);
71 typedef const struct {
77 extern key_code_name_t key_name_conv_tab
[];
78 extern int we_are_background
;
80 /* Set keypad mode (xterm and linux console only) */
81 void numeric_keypad_mode (void);
82 void application_keypad_mode (void);