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
21.8k stars 905 forks source link

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

Open KanishakVaidya opened 3 months ago

KanishakVaidya commented 3 months 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 3 months ago

MRs welcome. The current mod state is stored in IKeyboard