I have had this problem multiple times - tried the surface repair tool, uninstalling/reinstalling the driver, downloading the full driver update, etc, etc,. Nothing worked.
Today I got lucky. The Surface HID Mini Driver was the only driver in the device manager showing a problem. I uninstalled it, as I have many times. But then I uninstalled all of the keyboard drivers - there were three of them, all named HID Keyboard Device. None of them indicated a problem when I checked, but I went ahead and uninstalled them anyway.
Then I restarted the computer, and now the keyboard is working fine again. There are now 4 HID Keyboard devices under Keyboards, and the Hid mini driver is still there under Human Interface Devices.
This worked i tried uninstalling the surface hid mini driver several times with no success. As soon as i uninstalled all of the keyboard drivers and the mini driver i powered the laptop down, closed the screen unplugged the power cable and external mouse waited 10 seconds, plugged the power back in and opened the laptop, pushed the power button and after booting the keyboard was working again.