I am going to assume that you aren't referring to the on screen/touch keyboard and are using an external one?
If that is the case, disconnect the keyboard, reboot the tablet and then connect it again.
If that doesn't work, try connecting the keyboard to another device and see if the problem persists. If it does, then the keyboard itself is the the cause.