summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--v4l2-apps/util/keytable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/v4l2-apps/util/keytable.c b/v4l2-apps/util/keytable.c
index d7644d775..4283782d0 100644
--- a/v4l2-apps/util/keytable.c
+++ b/v4l2-apps/util/keytable.c
@@ -107,7 +107,7 @@ int main (int argc, char *argv[])
for (j = 0; j < 256; j++) {
for (i = 0; i < 256; i++) {
codes[0] = (j << 8) | i;
- codes[1] = KEY_UNKNOWN;
+ codes[1] = KEY_RESERVED;
ioctl(fd, EVIOCSKEYCODE, codes);
}
}
@@ -161,7 +161,7 @@ int main (int argc, char *argv[])
for (j = 0; j < 256; j++) {
for (i = 0; i < 256; i++) {
codes[0] = (j << 8) | i;
- if(ioctl(fd, EVIOCGKEYCODE, codes)==0)
+ if (!ioctl(fd, EVIOCGKEYCODE, codes) && codes[1] != KEY_RESERVED)
prtcode(codes);
}
}