How about borrowing your friend's keyboard and plug it into your
computer? Does your friend's keyboard work? If it works, then I
think your keyboard is faulty.
If your friend's keyboard also doesn't work, it could be problems
with your motherboard. If your motherboard isn't too old, bring
your warranty card and CPU to the repair centre and ask for
assistance, replace it if necessary.