Make noop a valid keycode (#138)

master
Raheman Vaiya 4 years ago
parent 44844b7a23
commit 6581f36a43
  1. BIN
      keyd.1.gz
  2. 2
      keyd.md
  3. 2
      src/descriptor.c
  4. 3
      src/keyboard.c
  5. 1
      src/keys.c
  6. 1
      src/keys.h

Binary file not shown.

@ -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

@ -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(<modifier name>) instead\n");
} else if (!strcmp(s, "noop")) {
d->op = OP_UNDEFINED;
} else if (!parse_macro(s, &macro)) {
if (lt->nr_macros >= MAX_MACROS) {
err("max macros (%d), exceeded", MAX_MACROS);

@ -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;

@ -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)

@ -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

Loading…
Cancel
Save