File: show-numeric-key-values.diff

package info (click to toggle)
input-utils 1.3-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 368 kB
  • sloc: ansic: 1,217; sh: 65; makefile: 5
file content (21 lines) | stat: -rw-r--r-- 574 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From: Steve Langasek <vorlon@debian.org>
Subject: output the numeric value for keycodes in addition to the symbolic name
Forwarded: no

---
 input.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

--- a/input.c
+++ b/input.c
@@ -214,8 +214,8 @@ void print_event(struct input_event *eve
 		EV_NAME[event->type]);
 	switch (event->type) {
 	case EV_KEY:
-		printf(" %s %s",
-			ev_type_name(EV_KEY, event->code),
+		printf(" %s (0x%x) %s",
+			ev_type_name(EV_KEY, event->code), event->code,
 			event->value ? "pressed" : "released");
 		break;
 	case EV_REL: