Dell keyboards fail often enough, particularly USB keyboards... but PS/2 keyboards also fail more frequently, just as a lightbulb can fail. We even see new Dell keyboards arrive bad in the box.
Since a replacement keyboard works, you can get a new one for $10 to $12, or a used one for $2. Repair shops throw hundreds away every year. Just ask for one, and you will probably get it free.
But before you install it, look for damage or crud in the socket.