From bac8a5d2822835cf47175d1162030653fadd5c09 Mon Sep 17 00:00:00 2001 From: johannst Date: Thu, 15 Feb 2024 23:29:57 +0000 Subject: deploy: 4485708c972815bbb6df7f5a228683aa855d553d --- linux/input.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'linux/input.html') diff --git a/linux/input.html b/linux/input.html index b1cd7be..53d0a32 100644 --- a/linux/input.html +++ b/linux/input.html @@ -216,7 +216,7 @@ file /proc/bus/input/devices in the proc filesystem can be consulte

This yields entries as follows and shows which Handlers are assigned to which Name.

I: Bus=0018 Vendor=04f3 Product=0033 Version=0000
-N: Name="Elan Touchpad"
+N: Name="Elan Touchpad"
 ...
 H: Handlers=event15 mouse0
 ...
@@ -241,9 +241,9 @@ struct input_event {
 
 const char* type(unsigned short t) {
     static char buf[32];
-    const char* fmt = "0x%x";
+    const char* fmt = "0x%x";
     switch (t) {
-#define FMT(TYPE) case TYPE: fmt = #TYPE"(0x%x)"; break
+#define FMT(TYPE) case TYPE: fmt = #TYPE"(0x%x)"; break
         FMT(EV_SYN);
         FMT(EV_KEY);
         FMT(EV_REL);
@@ -256,9 +256,9 @@ const char* type(unsigned short t) {
 
 const char* code(unsigned short c) {
     static char buf[32];
-    const char* fmt = "0x%x";
+    const char* fmt = "0x%x";
     switch (c) {
-#define FMT(CODE) case CODE: fmt = #CODE"(0x%x)"; break
+#define FMT(CODE) case CODE: fmt = #CODE"(0x%x)"; break
         FMT(BTN_LEFT);
         FMT(BTN_RIGHT);
         FMT(BTN_MIDDLE);
@@ -274,7 +274,7 @@ const char* timefmt(const struct timeval* t) {
     assert(t);
     struct tm* lt = localtime(&t->tv_sec); // Returns pointer to static tm object.
     static char buf[64];
-    strftime(buf, sizeof(buf), "%H:%M:%S", lt);
+    strftime(buf, sizeof(buf), "%H:%M:%S", lt);
     return buf;
 }
 
@@ -288,7 +288,7 @@ int main(int argc, char* argv[]) {
     while (1) {
         int ret = read(fd, &inp, sizeof(inp));
         assert(ret == sizeof(inp));
-        printf("time: %s type: %s code: %s value: 0x%x\n",
+        printf("time: %s type: %s code: %s value: 0x%x\n",
                timefmt(&inp.time), type(inp.type), code(inp.code), inp.value);
     }
 }
-- 
cgit v1.2.3