I have a Sun keyboard (Type 5, I think) with several additional keys on the left hand side of the keyboard. I use one of these keys, "Again" as a modifier to toggle the function of the number keys on the top row. These keys can be in their natural state (digits) or in a modified state (accented French characters).
In order to know which state the keys are in, I would like to use the Scroll Lock LED or Compose LED as an indicator. That is, the Scroll Lock or Compose LED should switch on/off at the press of the "Again" key.
How can this be done on Ubuntu 16.04?