How to highlight keyboard led using current locale

1

1

How does one make the keyboard led show his current locale? It might be useful for users using two locales (languages).

Desired behavior:

  • capslock led on keyboad is OFF for your first locale (english, for example)
  • capslock led is ON for your second locale (russian, for example)
  • capslock led changes when you're switching windows (from a window with "ru" to a window with "en")

VasyaNovikov

Posted 2014-03-16T23:29:26.550

Reputation: 2 329

Answers

1

A solution for a debian-based distribution:

  • run dpkg-reconfigure keyboard-configuration. You can set up the capslock switching here (altrough it would not activate keyboard led by default). (Skip for non-debian distr.)
  • open /etc/default/keyboard (find an alternative for non-debian distr.)
  • find XKBLAYOUT. You should see something like "us,ru" inside. If not, edit this line.
  • find XKBOPTIONS. Set this inside: grp:caps_toggle,grp:switch,grp_led:caps. The caps_toggle and switch mean switching layout by capslock (skip if you only want keyboard led, not switching). The grp_led:caps means to use the led for layout indication.
  • reboot the system or apply changes immediately if you know how. For debian-based distros it's dpkg-reconfigure keyboard-configuration.

VasyaNovikov

Posted 2014-03-16T23:29:26.550

Reputation: 2 329