Apple USB keyboard stopped working
My Apple Extended wired keyboard has stopped working with my iMac Late 2012 High Sierra 10.13.6, I think since the latest Safari update 12.0.2 but this may be a coincidence. Sometimes the wired mouse connected to the keyboard's side port does work even if the keyboard does not, but not always. It makes no difference whether I connect the keyboard directly to any of the Mac's integral USB sockets or my powered USB 3.0 hub. Other peripherals work in all the USB ports so they are not faulty. I have also tried using an Apple keyboard extension lead and a general USB extension, as suggested in various online posts. I have reset the PRAM with no benefit.
The keyboard is not apparently faulty as it works completely normally with my wife's Mac Mini (2009) on El Capitan. She doesn't want it because she likes her Bluetooth small keyboard. I have a second apparently identical keyboard that does work with my computer too. But I would like to keep using the old one as long as possible and since it works on another computer I don't see why I can't.
Any suggestions, please?
iMac Line (2012 and Later)