--- a/plugins/ipc-rules/ipc-rules-common.hpp +++ b/plugins/ipc-rules/ipc-rules-common.hpp @@ -285,6 +285,11 @@ { state["possible-layouts"].append(get_layout_name(i)); } + + // Pyr: Caps Lock and Num Lock (their LEDs as xkbcommon tracks them), so a panel can show + // a change that has no other sign on screen. + state["caps-lock"] = xkb_state_led_name_is_active(keyboard->xkb_state, XKB_LED_NAME_CAPS) > 0; + state["num-lock"] = xkb_state_led_name_is_active(keyboard->xkb_state, XKB_LED_NAME_NUM) > 0; } else { state["layout"] = "unknown";