keytest: show the human name together with the keycode
authorH. Peter Anvin <hpa@linux.intel.com>
Mon, 11 Apr 2011 22:33:48 +0000 (15:33 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Mon, 11 Apr 2011 22:33:48 +0000 (15:33 -0700)
Since we now have library support for showing the keycode name, make
keytest print that as well.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
com32/samples/keytest.c

index b4f8f5b..a5cdd5c 100644 (file)
@@ -43,7 +43,7 @@ static void cooked_keys(void)
        if (key >= 0x20 && key < 0x100) {
            putchar(key);
        } else {
-           printf("[%04x]", key);
+           printf("[%s,%04x]", key_code_to_name(key), key);
        }
     }
 }