hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
19.63k stars 829 forks source link

hyprctl devices: Getting caps lock and num lock status #7271

Open KanishakVaidya opened 1 month ago

KanishakVaidya commented 1 month ago

Description

To get the information about keyboard devices we can do something like

hyprctl devices -j

getting the following information about every keyboard device:

...
{
  "address": "0x<the address>",
  "name": "<the name>",
  "rules": "",
  "model": "",
  "layout": "us",
  "variant": "",
  "options": "",
  "active_keymap": "English (US)",
  "main": true/false
}
...

Can we also get the information about the caps lock and num lock status. Weather currently the caps lock is ON or OFF. Or maybe some other way to achieve the same (get caps/num lock status).

vaxerski commented 1 month ago

MRs welcome. The current mod state is stored in IKeyboard