blob: 038ca29f65cfe5e6cf1b7bc5c8a82a049e2670f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
--- 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";
|