sbenning: adding key-input correspondance in ft_input.h
This commit is contained in:
parent
4cb56f450a
commit
0a3b0cc03e
2 changed files with 35 additions and 35 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: sbenning <sbenning@student.42.fr> +#+ +:+ +#+ */
|
/* By: sbenning <sbenning@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/12/09 02:05:22 by sbenning #+# #+# */
|
/* Created: 2016/12/09 02:05:22 by sbenning #+# #+# */
|
||||||
/* Updated: 2016/12/12 10:48:33 by sbenning ### ########.fr */
|
/* Updated: 2016/12/12 14:32:27 by sbenning ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -19,34 +19,34 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# ifdef LINUX
|
# ifdef LINUX
|
||||||
# define RL_INSERT_CODE 0x7e325b1b
|
# define RL_INSERT_CODE 0x7e325b1b /* Insert */
|
||||||
# define RL_CLEAR_CODE 0xc
|
# define RL_CLEAR_CODE 0xc /* Ctrl+L */
|
||||||
# define RL_NL_CODE 0xa
|
# define RL_NL_CODE 0xa /* Enter */
|
||||||
# define RL_COMP_CODE 0x9
|
# define RL_COMP_CODE 0x9 /* Tab */
|
||||||
# define RL_LEFT_CODE 0x445b1b
|
# define RL_LEFT_CODE 0x445b1b /* Left */
|
||||||
# define RL_RIGHT_CODE 0x435b1b
|
# define RL_RIGHT_CODE 0x435b1b /* Right */
|
||||||
# define RL_WLEFT_CODE 0x44323b315b1b
|
# define RL_WLEFT_CODE 0x44323b315b1b /* Maj+Left */
|
||||||
# define RL_WRIGHT_CODE 0x43323b315b1b
|
# define RL_WRIGHT_CODE 0x43323b315b1b /* Maj+Right */
|
||||||
# define RL_HOME_CODE 0x485b1b
|
# define RL_HOME_CODE 0x485b1b /* Home */
|
||||||
# define RL_END_CODE 0x465b1b
|
# define RL_END_CODE 0x465b1b /* End */
|
||||||
# define RL_PAGEUP_CODE 0x7e355b1b
|
# define RL_PAGEUP_CODE 0x7e355b1b /* PageUp */
|
||||||
# define RL_PAGEDOWN_CODE 0x7e365b1b
|
# define RL_PAGEDOWN_CODE 0x7e365b1b /* PageDown */
|
||||||
# define RL_SELECT_RIGHT_CODE 0x43333b315b1b
|
# define RL_SELECT_RIGHT_CODE 0x43333b315b1b /* Alt+Right */
|
||||||
# define RL_SELECT_LEFT_CODE 0x44333b315b1b
|
# define RL_SELECT_LEFT_CODE 0x44333b315b1b /* Alt+Left */
|
||||||
# define RL_SELECT_PAGEUP_CODE 0x7e333b355b1b
|
# define RL_SELECT_PAGEUP_CODE 0x7e333b355b1b /* Alt+PageUp */
|
||||||
# define RL_SELECT_PAGEDOWN_CODE 0x7e333b365b1b
|
# define RL_SELECT_PAGEDOWN_CODE 0x7e333b365b1b /* Alt+PageDown */
|
||||||
# define RL_SELECT_HOME_CODE 0x48333b315b1b
|
# define RL_SELECT_HOME_CODE 0x48333b315b1b /* Alt+Home */
|
||||||
# define RL_SELECT_END_CODE 0x46333b315b1b
|
# define RL_SELECT_END_CODE 0x46333b315b1b /* Alt+End */
|
||||||
# define RL_SELECT_WRIGHT_CODE 0x43343b315b1b
|
# define RL_SELECT_WRIGHT_CODE 0x43343b315b1b /* Alt+Maj+Right */
|
||||||
# define RL_SELECT_WLEFT_CODE 0x44343b315b1b
|
# define RL_SELECT_WLEFT_CODE 0x44343b315b1b /* Alt+Maj+Left */
|
||||||
# define RL_RETARR_CODE 0x7f
|
# define RL_RETARR_CODE 0x7f /* RetArr */
|
||||||
# define RL_SUPPR_CODE 0x7e335b1b
|
# define RL_SUPPR_CODE 0x7e335b1b /* Suppr */
|
||||||
# define RL_ESC_CODE 0x5c
|
# define RL_ESC_CODE 0x5c /* Escape `\` */
|
||||||
# define RL_QUOTE_CODE 0x27
|
# define RL_QUOTE_CODE 0x27 /* Quote `'` */
|
||||||
# define RL_DQUOTE_CODE 0x22
|
# define RL_DQUOTE_CODE 0x22 /* Double Quote `"` */
|
||||||
# define RL_COPY_CODE 0x631b
|
# define RL_COPY_CODE 0x631b /* Alt+C */
|
||||||
# define RL_CUT_CODE 0x781b
|
# define RL_CUT_CODE 0x781b /* Alt+X */
|
||||||
# define RL_PASTE_CODE 0x761b
|
# define RL_PASTE_CODE 0x761b /* Alt+V */
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifdef MACOSX
|
# ifdef MACOSX
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: sbenning <sbenning@student.42.fr> +#+ +:+ +#+ */
|
/* By: sbenning <sbenning@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/12/08 18:02:25 by sbenning #+# #+# */
|
/* Created: 2016/12/08 18:02:25 by sbenning #+# #+# */
|
||||||
/* Updated: 2016/12/12 12:50:39 by sbenning ### ########.fr */
|
/* Updated: 2016/12/12 14:38:54 by sbenning ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
# include "ft_curs.h"
|
# include "ft_curs.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Input-Key Mapping
|
* Input-Key Mapping !!! LINUX Or MACOSX !!!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# define LINUX
|
# define LINUX
|
||||||
|
|
@ -88,9 +88,9 @@ typedef int (*t_input_function)(t_line *, long int);
|
||||||
* pos : cursor position in the destination buffer
|
* pos : cursor position in the destination buffer
|
||||||
* size : allocated size of the destination buffer
|
* size : allocated size of the destination buffer
|
||||||
* used : actual used size in the destination buffer
|
* used : actual used size in the destination buffer
|
||||||
* select : start position of the select area in the destination buffer
|
* select : start position of the video (aka selected) area in the destination buffer
|
||||||
* clipboard : duplication of the copied/cuted part of the destination buffer
|
* clipboard : duplication of the copied/cuted part of the destination buffer
|
||||||
* stack : list of stacked line. (lines are stacked when a quoted new line appear)
|
* stack : list of stacked line. (lines are stacked when a quoted (or escaped) new line appear)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct s_line
|
struct s_line
|
||||||
|
|
@ -98,11 +98,11 @@ struct s_line
|
||||||
int bitset;
|
int bitset;
|
||||||
char *prompt;
|
char *prompt;
|
||||||
char *input;
|
char *input;
|
||||||
|
char *clipboard;
|
||||||
int pos;
|
int pos;
|
||||||
int size;
|
int size;
|
||||||
int used;
|
int used;
|
||||||
int select;
|
int select;
|
||||||
char *clipboard;
|
|
||||||
t_curs curs;
|
t_curs curs;
|
||||||
t_list *stack;
|
t_list *stack;
|
||||||
/*COMPATIBILITY*/
|
/*COMPATIBILITY*/
|
||||||
|
|
@ -185,7 +185,7 @@ int rl_esc_function(t_line *line, long int input); /* Backslash */
|
||||||
int rl_quote_function(t_line *line, long int input); /* Simple quote */
|
int rl_quote_function(t_line *line, long int input); /* Simple quote */
|
||||||
int rl_dquote_function(t_line *line, long int input); /* Double quote */
|
int rl_dquote_function(t_line *line, long int input); /* Double quote */
|
||||||
int rl_nl_function(t_line *line, long int input); /* New line */
|
int rl_nl_function(t_line *line, long int input); /* New line */
|
||||||
int rl_comp_function(t_line *line, long int input); /* New line */
|
int rl_comp_function(t_line *line, long int input); /* Tabulation */
|
||||||
int rl_left_function(t_line *line, long int input); /* Left move */
|
int rl_left_function(t_line *line, long int input); /* Left move */
|
||||||
int rl_right_function(t_line *line, long int input); /* Right move */
|
int rl_right_function(t_line *line, long int input); /* Right move */
|
||||||
int rl_wleft_function(t_line *line, long int input); /* Word left move */
|
int rl_wleft_function(t_line *line, long int input); /* Word left move */
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue