MBP, El Capitan - Keyboard not working, but I can get to safe mode?
Since the hardware diagnostics test did not find anything wrong with the keyboard, this is more than likely a software glitch. 

Take your laptop into an Apple Store, they always help out with things like this.