aboutsummaryrefslogtreecommitdiffstats
path: root/com32/samples/keytest.c
diff options
context:
space:
mode:
authorhpa <hpa>2004-12-20 22:55:48 +0000
committerhpa <hpa>2004-12-20 22:55:48 +0000
commit227b9fc57a0eb10fae0865d84c5ab88f9eab4f6a (patch)
treeecef8c238330bf7be0b998b6bd62d33c991758ea /com32/samples/keytest.c
parent6971c383a933046341da07d30270a91434322426 (diff)
downloadsyslinux-elf-227b9fc57a0eb10fae0865d84c5ab88f9eab4f6a.tar.gz
syslinux-elf-227b9fc57a0eb10fae0865d84c5ab88f9eab4f6a.tar.xz
syslinux-elf-227b9fc57a0eb10fae0865d84c5ab88f9eab4f6a.zip
Actually get things working with nonblocking raw console read;
this allows us to detect the Esc key.
Diffstat (limited to 'com32/samples/keytest.c')
-rw-r--r--com32/samples/keytest.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/com32/samples/keytest.c b/com32/samples/keytest.c
index 0500e057..d10bd665 100644
--- a/com32/samples/keytest.c
+++ b/com32/samples/keytest.c
@@ -20,6 +20,8 @@
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
+#include <time.h>
+#include <sys/times.h>
#include <consoles.h> /* Provided by libutil */
#include <getkey.h>
@@ -70,6 +72,7 @@ int main(void)
{
console_ansi_raw();
+ printf("CLK_TCK = %d\n", (int)CLK_TCK);
printf("Press keys, end with Ctrl-C...\n");
for (;;) {