diff options
Diffstat (limited to 'src/ft_key_events.c')
-rw-r--r-- | src/ft_key_events.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/ft_key_events.c b/src/ft_key_events.c index 82235fc..6702988 100644 --- a/src/ft_key_events.c +++ b/src/ft_key_events.c @@ -5,28 +5,28 @@ static int ft_w_key(void) { - ft_printf("w\n"); + ft_printf("[W]\n"); return (0); } static int ft_a_key(void) { - ft_printf("a\n"); + ft_printf("[A]\n"); return (0); } static int ft_s_key(void) { - ft_printf("s\n"); + ft_printf("[S]\n"); return (0); } static int ft_d_key(void) { - ft_printf("d\n"); + ft_printf("[D]\n"); return (0); } @@ -44,11 +44,10 @@ ft_key_event(int keycode, void *param) (keycode <= 3) ? ((*fun_ptr[keycode])()) : 0; if (keycode == 53) { - ft_memdel(((t_winlist*)param)->wlx); - ft_memdel(((t_winlist*)param)->winptr); - ft_memdel((t_winlist*)param); - ft_printf("Exiting program\n"); - exit(0); + ft_memdel(((t_win*)param)->wlx); + ft_memdel(((t_win*)param)->winptr); + ft_memdel((t_win*)param); + ft_exit(0); } return (0); } |