aboutsummaryrefslogtreecommitdiffstats
path: root/keys.c
blob: 7bfb2df3cf52df1e9cb8bfa2b222692fef0a1a7e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "keys.h"

#include <ncurses.h>
#include <stdlib.h>

#include "fm.h"
#include "log.h"
#include "wm.h"

void handling_keys(int ch, terminal *t, fm_info *i)
{
	switch (ch) {
	case KEY_RESIZE:;
	/* Quit */
	case 'q':
		endwin();
		exit(0);
	/* Down */
	case 'j':
		fm_entries_scrool(t, i, 1);
		break;
	case 'k':
		fm_entries_scrool(t, i, -1);
		break;

	default:
		return;
	}
}