chiark / gitweb /
keymap: continue reading keymap after invalid scancodes
[elogind.git] / extras / keymap / keymap.c
index ed6b69d5f141d4b59c9bae21d473b1feb3864fca..eabd1e44d823f768703cc74de0bb2a363b3c3280 100644 (file)
@@ -141,8 +141,9 @@ static int dump_table(int fd) {
                int keycode;
 
                if ((keycode = evdev_get_keycode(fd, scancode, 1)) < 0) {
-                       if (keycode != -2)
-                               r = -1;
+                       if (keycode == -2)
+                               continue;
+                       r = -1;
                        break;
                }
 
@@ -311,7 +312,7 @@ static void interactive(int fd)
 
        /* grab input device */
        ioctl(fd, EVIOCGRAB, 1);
-       puts("Press ESC to finish");
+       puts("Press ESC to finish, or Control-C if this device is not your primary keyboard");
 
        has_scan = has_key = 0;
        while (read_event(fd, &ev)) {