If it happens in your browser (as in what you just posted) and in other
programs, then it isn't anything to do specifically with Word. It's more likely
a fault in your keyboard, or possibly in the keyboard controller inside your
computer.
If this is a desktop computer, try plugging in a different keyboard to see if
the problem goes away. If it's a laptop and the keyboard is bad, you'll have to
contact the manufacturer for service.