Keyboard problem

The green small light on top of the keyboard will not stay on. When I press it to switch on it glows green for 3-4 seconds then goes out. Wondering if the switch is faulty? However it was ok this morning and I haven;t used the switch for months.
I have another keyboard on my older iMac (being used for this message) and wonder if this could be used temporarily on the newer iMac? However I tried this but it wasn't picked up by Bluetooth. Does it have to be 'paired' in some way?