diff --git a/docs/labwc.1.scd b/docs/labwc.1.scd index 31f28c19..60f9b495 100644 --- a/docs/labwc.1.scd +++ b/docs/labwc.1.scd @@ -158,10 +158,6 @@ example: *LABWC_DEBUG_FOO=1 labwc*. for *Cascade*) for config and menu files respectively. -*LABWC_DEBUG_KEY_STATE* - Enable logging of press and release events for bound keys (generally - key-combinations like *Ctrl-Alt-t*). - # SEE ALSO labwc-actions(5), labwc-config(5), labwc-menu(5), labwc-theme(5) diff --git a/src/input/key-state.c b/src/input/key-state.c index 6d089891..fde90634 100644 --- a/src/input/key-state.c +++ b/src/input/key-state.c @@ -169,40 +169,15 @@ key_state_indicator_toggle(void) show_debug_indicator = !show_debug_indicator; } -static void -report(struct lab_set *key_set, const char *msg) -{ - static char *should_print; - static bool has_run; - - if (!has_run) { - should_print = getenv("LABWC_DEBUG_KEY_STATE"); - has_run = true; - } - if (!should_print) { - return; - } - printf("%s", msg); - for (int i = 0; i < key_set->size; ++i) { - printf("%d,", key_set->values[i]); - } - printf("\n"); -} - uint32_t * key_state_pressed_sent_keycodes(void) { - report(&pressed, "before - pressed:"); - report(&bound, "before - bound:"); - /* pressed_sent = pressed - bound */ pressed_sent = pressed; for (int i = 0; i < bound.size; ++i) { lab_set_remove(&pressed_sent, bound.values[i]); } - report(&pressed_sent, "after - pressed_sent:"); - return pressed_sent.values; }