If it works in all apps after a reboot, and if you've unplugged it and plugged it back in and it still has a problem, then it sounds like either something got stuck in your keyboard or the hardware is defective. One last thing to try: if you have another Mac available, see if plugging the keyboard into another Mac causes the same problem. If it does, it's definitely a hardware problem with the keyboard. If it works OK on another Mac, the problem lies elsewhere in your system.