Having to unplug and plug in my external keyboard every time it goes asleep and I leave it alone after awhile.
I have an External keyboard that I bought the same time as my iMac, I've only had them for a few days, the first time I used my keyboard, something came up saying the device was not recognized, so I followed the steps, and it told me I needed to change the keyboard type. However I unplugged it and it worked fine. Yet when it goes asleep after I leave it alone after a while, it doesn't work until I unplug it and plug it in again, however my mouse works fine and is always working even if it goes asleep too. I'm wondering if it's the computer or the keyboard itself, how can I fix this issue?
iMac 24″, macOS 12.1