[syslinux:master] keytest: make somewhat more comprehensible
syslinux-bot for H. Peter Anvin
hpa at linux.intel.com
Mon Apr 18 13:54:19 PDT 2011
Commit-ID: c4c4a898e5856bda4857834845d9f92a97271233
Gitweb: http://syslinux.zytor.com/commit/c4c4a898e5856bda4857834845d9f92a97271233
Author: H. Peter Anvin <hpa at linux.intel.com>
AuthorDate: Mon, 11 Apr 2011 15:42:06 -0700
Committer: H. Peter Anvin <hpa at linux.intel.com>
CommitDate: Mon, 11 Apr 2011 15:42:06 -0700
keytest: make somewhat more comprehensible
Someone may very well need to use keytest to figure out their
keymappings. Make it a bit more user friendly.
Signed-off-by: H. Peter Anvin <hpa at linux.intel.com>
---
com32/samples/keytest.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/com32/samples/keytest.c b/com32/samples/keytest.c
index a5cdd5c..09c041a 100644
--- a/com32/samples/keytest.c
+++ b/com32/samples/keytest.c
@@ -37,7 +37,7 @@ static void cooked_keys(void)
if (key == 0x03) {
printf("[done]\n");
exit(0);
- } else if (key == '?')
+ } else if (key == '!')
return;
if (key >= 0x20 && key < 0x100) {
@@ -63,7 +63,8 @@ static void raw_keys(void)
} else if (key == '!')
return;
- printf("<%02x>", key);
+ if (key != EOF)
+ printf("<%02x>", key);
}
}
@@ -72,7 +73,7 @@ int main(void)
console_ansi_raw();
printf("CLK_TCK = %d\n", (int)CLK_TCK);
- printf("Press keys, end with Ctrl-C...\n");
+ printf("Press keys, end with Ctrl-C, ! changes from cooked to raw\n");
for (;;) {
cooked_keys();
More information about the Syslinux-commits
mailing list