aboutsummaryrefslogtreecommitdiffstats
path: root/fbpdf.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2019-01-18 10:23:41 +0100
committerGerd Hoffmann <kraxel@redhat.com>2019-01-18 11:03:55 +0100
commit1e49f9371f39475be7d2a3a9be2994ce5d27870b (patch)
treeb84ba5b35e846beddca3c78b6f01d12a6d5116a7 /fbpdf.c
parent03c8b71a085afb2a856fcf9a6e53c0b83cd9795c (diff)
downloadfbida-1e49f9371f39475be7d2a3a9be2994ce5d27870b.tar.gz
abstract away some kbd details
Diffstat (limited to 'fbpdf.c')
-rw-r--r--fbpdf.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fbpdf.c b/fbpdf.c
index 6ceff19..2c2b10f 100644
--- a/fbpdf.c
+++ b/fbpdf.c
@@ -340,7 +340,7 @@ int main(int argc, char *argv[])
gfx->stride);
}
- tty_raw();
+ kbd_init();
index = 0;
newpage = true;
@@ -364,9 +364,7 @@ int main(int argc, char *argv[])
continue;
}
- memset(key, 0, sizeof(key));
- read(0, key, sizeof(key)-1);
- keycode = kbd_parse(key, &keymod);
+ kbd_read(key, sizeof(key), &keycode, &keymod);
switch (keycode) {
case KEY_ESC:
@@ -417,7 +415,7 @@ int main(int argc, char *argv[])
}
}
- tty_restore();
+ kbd_fini();
cleanup_and_exit(0);
return 0;
}