summaryrefslogtreecommitdiff
path: root/src/operetta.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/operetta.c')
-rw-r--r--src/operetta.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/operetta.c b/src/operetta.c
index ae9a418..4669ef8 100644
--- a/src/operetta.c
+++ b/src/operetta.c
@@ -51,11 +51,19 @@ int main(int argc, char** argv) {
while (1) {
draw_screen();
int c = getch();
- if (c == 'j') {
- move_selection(1);
- }
- if (c == 'k') {
- move_selection(-1);
+ switch (c) {
+ case 'j':
+ move_selection(1);
+ break;
+ case 'k':
+ move_selection(-1);
+ break;
+ case ' ':
+ interact_selected();
+ break;
+ case 'q':
+ exit(0);
+ break;
}
}
free(content);