At a guess there's a short somewhere inside the keyboard between the Power On key and the PSW (power switch, pin #2) on the ADB port (or plug, if it's a permanently wired cable).
A quickie fix might be to make up a box to go between the keyboard and the Mac, with a NO (normally-open) momentary...