mirror of
https://github.com/labwc/labwc.git
synced 2026-06-13 14:33:18 -04:00
Remove key state debugging by LABWC_DEBUG_KEY_STATE env var
I think this is now less demanded due to the introduction of DebugToggleKeyStateIndicator action.
This commit is contained in:
parent
6ce25978e7
commit
98b3d911eb
2 changed files with 0 additions and 29 deletions
|
|
@ -158,10 +158,6 @@ example: *LABWC_DEBUG_FOO=1 labwc*.
|
|||
for *<placement><policy>Cascade</policy></placement>*) 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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue