5 void init_key_input_fd (void);
7 int get_event (Gpm_Event
*event
, int redo_event
, int block
);
11 #ifndef PORT_HAS_GETCH
14 /* Possible return values from get_event: */
18 /* Used to get the modifier information */
19 /* Currently, it just works on the Linux console */
21 # ifndef SHIFT_PRESSED
22 # define SHIFT_PRESSED 0x0010
25 # define SHIFT_PRESSED 1
27 #define ALTR_PRESSED 2
28 #define CONTROL_PRESSED 4
29 #define ALTL_PRESSED 8
32 extern int double_click_speed
;
33 extern int old_esc_mode
;
34 extern int irix_fn_keys
;
35 extern int use_8th_bit_as_meta
;
37 /* While waiting for input, the program can select on more than one file */
39 typedef int (*select_fn
)(int fd
, void *info
);
41 /* Channel manipulation */
42 void add_select_channel (int fd
, select_fn callback
, void *info
);
43 void delete_select_channel (int fd
);
44 void remove_select_channel (int fd
);
46 /* Activate/deactivate the channel checking */
47 void channels_up (void);
48 void channels_down (void);
50 /* Abort/Quit chars */
51 int is_abort_char (int c
);
52 int is_quit_char (int c
);
54 #define XCTRL(x) ((x) & 31)
55 #define ALT(x) (0x200 | (unsigned int)(x))
57 /* To define sequences and return codes */
58 #define MCKEY_NOACTION 0
59 #define MCKEY_ESCAPE 1
61 /* Return code for the mouse sequence */
62 #define MCKEY_MOUSE -2
64 void do_define_key (int code
, char *strcap
);
65 void define_sequence (int code
, char *seq
, int action
);
67 /* internally used in key.c, defined in keyxtra.c */
68 void load_xtra_key_defines (void);
70 /* Learn a single key */
71 char *learn_key (void);
73 /* Returns a key code (interpreted) */
74 int get_key_code (int nodelay
);
82 extern key_code_name_t key_name_conv_tab
[];
83 extern int we_are_background
;
85 /* Set keypad mode (xterm and linux console only) */
87 void numeric_keypad_mode (void);
88 void application_keypad_mode (void);