Lock keys panel indicator for MATE Desktop

Native Solution

It turns out that MATE-Tweak, built into the default installation of Ubuntu MATE, has an option to enable keyboard LED indicators

Under Interface, check the box Enable keyboard LED

And now you have three key lock icons in your indicator panel - one for each key. Here's what it looks like when Caps Lock is on but the other locks are off:


Introduction

Disclaimer: I am author of this indicator

The lks-indicator shows status of the lock keys , like Caps Lock, Scroll Lock, and Num Lock. While originally written for Unity desktop, it works with some others, in particular with MATE. It has options for ignoring certain keys, or showing all and indicating which one is active.

Usage

As shown by -h it has several command line options:

usage: lks-indicator [-h] [--show-all]
                     [--ignore-keys IGNORE_KEYS [IGNORE_KEYS ...]]

lks-indicator - Indicates on/off status of Lock keys.

optional arguments:
  -h, --help            show this help message and exit
  --show-all            Show all keys, and mark switched-on keys by surrounding with brackets. 

  --ignore-keys IGNORE_KEYS [IGNORE_KEYS ...]
                        Ignore specified keys (C, N or S).

Launching is as simple as running in command-line (from the same directory where indicator is located)

python lks-indicator 

To close the indicator, please use the Quit button. Using Ctrl + C doesn't work well with indicators.

Installation

The indicator is available on GitHub

For those who have git installed:

  1. cd /opt
  2. sudo git clone https://github.com/SergKolo/lks-indicator.git
  3. chmod -R +x /opt/lks-indicator/

If you do not have git installed, run sudo apt-get install git

Alternatively , you can just download the repository as zip file.

wget https://github.com/SergKolo/lks-indicator/archive/master.zip

Indicator in action

As you can see below, the indicator displays green icon and which key is currently active. When no keys are engaged, the icon remains green

enter image description here

Update September 2nd , 2016:

The indicator got a bit of update:

  • monochrome indicator added, and can be used with -m option
  • label now uses circles to indicate which key is enganged

enter image description here


If you prefer the terminal or dconf-editor, which also goes for regular Linux Mint, you can use this setting: org.mate.peripherals-keyboard-xkb.general duplicate-leds, e.g.

gsettings set org.mate.peripherals-keyboard-xkb.general duplicate-leds true 

Tested on Linux Mint MATE 18.1.