First, turn off the keyboard holding the Power button until the green light stops. Then, on your computer, open System Preferences > Keyboard and it will search a keyboard, so turn on your keyboard and follow its steps
Thanks Mende1. I should have said that I had tried all the basic steps to revive the keyboard. Sorry.
The thing has now come back on line of its own accord - probably sulking after I had managed to connect up an old Dell keyboard! The question of why it dropped out and why nothing I did could awaken it remains. The joys of modern technology.