diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2019-01-18 10:23:41 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-01-18 11:03:55 +0100 |
commit | 1e49f9371f39475be7d2a3a9be2994ce5d27870b (patch) | |
tree | b84ba5b35e846beddca3c78b6f01d12a6d5116a7 /fbpdf.c | |
parent | 03c8b71a085afb2a856fcf9a6e53c0b83cd9795c (diff) | |
download | fbida-1e49f9371f39475be7d2a3a9be2994ce5d27870b.tar.gz |
abstract away some kbd details
Diffstat (limited to 'fbpdf.c')
-rw-r--r-- | fbpdf.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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; } |