kst/kte/ark/input.c

26 lines
354 B
C
Raw Normal View History

2020-02-12 00:40:45 +00:00
/*
* input.c: process key strokes and what not.
*/
#include <stdio.h>
#include "defs.h"
/*
* given the key, maybe do something with it, and return whether this
* means the screen should be refreshed.
*/
int
handle_keypress(int c)
{
static int mode = MODE_NORMAL;
if (mode == MODE_NORMAL) {
2020-02-12 22:28:34 +00:00
printf("%02x", c);
nextline();
2020-02-12 00:40:45 +00:00
}
return 1;
}