There were two versions of the model A1243 keyboard, and some G5 PowerMac (tower) users found that one of them worked, and the other didn't. There is an A version and a B version. And likely the same one which worked for the tower G5 would function with the iMac G5.
However this numbered designator is not an Aluminum keyboard
| Model Number | A1243 |
| Order Number | MB110LL/A, MB110LL/B |
Or use a white USB keyboard from the early 2003-05 era such as those shipped with the iMac G4, and early iMac G5.
This is an aluminum keyboard:
| Model Number | A1242 |
| Order Number | MB869LL/A |
There were compact keyboards without numeric keypad, and with BTO computers, a full-size keyboard with numberic keypad were available only as an option. Several later model keyboards worked well with the Intel-based Mac computers of their era; so when there is an issue with an earlier PPC-based Mac, look into those keyboards fitted to the computer vintage.
So if the keyboard you have does not work, could be it was intended for use with a later Mac computer after 2005. I was sure to get at least one as-new spare Apple USB keyboard, to have on hand for my older Macs.
Good luck & happy computing! 🙂