diff --git a/keyd.1.gz b/keyd.1.gz index d847bbe..31afca4 100644 Binary files a/keyd.1.gz and b/keyd.1.gz differ diff --git a/keyd.md b/keyd.md index 8d712cd..044eeb1 100644 --- a/keyd.md +++ b/keyd.md @@ -213,7 +213,7 @@ the full config actually looks something like this: A special kind of layer called a *composite layer* can be defined by creating a layer with a name consisting of existing layers delimited by _+_. The resultant -layer will be activated and given precedence when one of its constituents are +layer will be activated and given precedence when all of its constituents are activated. E.G diff --git a/src/descriptor.c b/src/descriptor.c index d1a7761..617eaec 100644 --- a/src/descriptor.c +++ b/src/descriptor.c @@ -575,8 +575,6 @@ int parse_descriptor(char *s, if (keycode_to_mod(code)) fprintf(stderr, "WARNING: mapping modifier keycodes directly may produce unintended results, you probably want layer() instead\n"); - } else if (!strcmp(s, "noop")) { - d->op = OP_UNDEFINED; } else if (!parse_macro(s, ¯o)) { if (lt->nr_macros >= MAX_MACROS) { err("max macros (%d), exceeded", MAX_MACROS); diff --git a/src/keyboard.c b/src/keyboard.c index ed17ba8..f9217b0 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -30,6 +30,9 @@ static long get_time() static void kbd_send_key(struct keyboard *kbd, uint8_t code, uint8_t pressed) { + if (code == KEYD_NOOP) + return; + if (pressed) kbd->last_pressed_output_code = code; diff --git a/src/keys.c b/src/keys.c index c19c52a..4155068 100644 --- a/src/keys.c +++ b/src/keys.c @@ -265,6 +265,7 @@ const struct keycode_table_ent keycode_table[256] = { [KEYD_MOUSE_1] = { "mouse1", NULL, NULL }, [KEYD_MOUSE_2] = { "mouse2", NULL, NULL }, [KEYD_FN] = { "fn", NULL, NULL }, + [KEYD_NOOP] = { "noop", NULL, NULL }, }; uint8_t keycode_to_mod(uint8_t code) diff --git a/src/keys.h b/src/keys.h index d4311f6..4c2885c 100644 --- a/src/keys.h +++ b/src/keys.h @@ -281,6 +281,7 @@ struct modifier_table_ent { /* These deviate from uinput codes. */ +#define KEYD_NOOP 195 #define KEYD_LEFT_MOUSE 249 #define KEYD_RIGHT_MOUSE 250 #define KEYD_MIDDLE_MOUSE 251