summaryrefslogtreecommitdiff
path: root/v4l2-apps/util/keytable.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-08-29 22:11:23 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-08-29 22:11:23 -0300
commit78ef9b9eb5faa72a5a279aa99293584491475e39 (patch)
treee5e92be3ccad1c6b0a032d0e8e9def77b1adb563 /v4l2-apps/util/keytable.c
parentff3dc3830a3899cbad05f00bc72220c47ad35ef6 (diff)
downloadmediapointer-dvb-s2-78ef9b9eb5faa72a5a279aa99293584491475e39.tar.gz
mediapointer-dvb-s2-78ef9b9eb5faa72a5a279aa99293584491475e39.tar.bz2
keytable: Don't display KEY_RESERVED codes
From: Mauro Carvalho Chehab <mchehab@redhat.com> As KEY_RESERVED is used for some spare space at the keycode table, don't return it while displaying the current table Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'v4l2-apps/util/keytable.c')
-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);
}
}