5 void init_key_input_fd (void);
8 int get_event (Gpm_Event
*event
, int redo_event
, int block
);
10 int ctrl_pressed (void);
12 #ifndef PORT_HAS_GETCH
15 /* Possible return values from get_event: */
19 /* Used to get the modifier information */
20 /* Currently, it just works on the Linux console */
22 # ifndef SHIFT_PRESSED
23 # define SHIFT_PRESSED 0x0010
26 # define SHIFT_PRESSED 1
28 #define ALTR_PRESSED 2
29 #define CONTROL_PRESSED 4
30 #define ALTL_PRESSED 8
31 int get_modifier (void);
33 extern int double_click_speed
;
34 extern int old_esc_mode
;
35 extern int irix_fn_keys
;
36 extern int use_8th_bit_as_meta
;
38 /* While waiting for input, the program can select on more than one file */
40 typedef int (*select_fn
)(int fd
, void *info
);
42 /* Channel manipulation */
43 void add_select_channel (int fd
, select_fn callback
, void *info
);
44 void delete_select_channel (int fd
);
45 void remove_select_channel (int fd
);
47 /* Activate/deactivate the channel checking */
48 void channels_up (void);
49 void channels_down (void);
51 /* Abort/Quit chars */
52 int is_abort_char (int c
);
53 int is_quit_char (int c
);
55 #define XCTRL(x) ((x) & 31)
56 #define ALT(x) (0x200 | (unsigned int)(x))
58 /* To define sequences and return codes */
59 #define MCKEY_NOACTION 0
60 #define MCKEY_ESCAPE 1
62 /* Return code for the mouse sequence */
63 #define MCKEY_MOUSE -2
65 void do_define_key (int code
, char *strcap
);
66 int define_sequence (int code
, char *seq
, int action
);
68 /* internally used in key.c, defined in keyxtra.c */
69 void load_xtra_key_defines (void);
71 /* Learn a single key */
72 char *learn_key (void);
74 /* Returns a key code (interpreted) */
75 int get_key_code (int nodelay
);
83 extern key_code_name_t key_name_conv_tab
[];
84 extern int we_are_background
;
86 /* Set keypad mode (xterm and linux console only) */
88 void numeric_keypad_mode (void);
89 void application_keypad_mode (void);