As title suggests, keyboard and trackpad are not working. However, force quit (shift+control+alt/option+power) had worked.
Where is the problem and how can I fix it?
In this model the trackpad and keyboard plug into the logic board directly, the top case just houses it but has no logical components for those in it.
This issue might not actually be the logic board, if I remember correctly the logic for the keyboard goes to the logic board, route back through the trackpad then back to the logic board via the trackpad IPD cable.
Since you've already reset the SMC and it didn't permanently fix it, I would first try another IPD/trackpad cable, if not resolved then try replacing the trackpad itself next.
It's unlikely to be the keyboard, hopefully not the logic board.
Well, in layman's terms, your computer has crashed because of some application overloading your memory (heap) or got stuck in some sort of infinite loop! That is why nothing works (it's not just your mouse and keyboard, it's everything), but when you press an interrupt key, since it has a higher priority than normal processes, it prevents the CPU to continue the task and pops up the force quit tab. Just figure out what is choking your system via Activity Monitor and kill it.