I know there are many solutions to this problem like using indicator-keylock
or using lks-indicator
.
I have tried them both. However since I am on Ubuntu 18.04, these are not working.
Can someone help me with something new or help me in writing a new indicator which I can use for myself at least?
You may use one of the following GNOME shell extensions to achieve your goal.
Lock Keys

This extension shows Num lock or Caps lock (or both) status on the top bar.
Keys Indicator

This extension shows Ctrl, Shift, Alt, Num lock, and Caps lock status on the top bar.
Lock Keys (another one)
Numlock & Capslock status on the panel. Icons are auto hidden. Simplified with no menus, notifications or settings.
There's a ppa for indicator-keylock on Ubuntu 18.04