After many unsuccessful attempts at PRAM reset, I got my keyboard and trackpad working again (perhaps only temporarily) by doing a PRAM reset with windows style external keyboard. I used my very old Microsoft Natural Wireless keyboard that connects to mac USB with a dongle.
Specifically:
>...