Clean the keyboard with a can of compressed air or buy replacement is all I can suggest. They do go bad when cookies, cat fur, etc.... and coffee get spilled/scattered on em. Key contacts do wear out.
I only mention this because I have fixed left mouse click which was a physical problem on a Asus EEEPC 900.
It required me to take the mouse pad apart.
All is mentioned above because of the statement
Try this in Deepin for my curiosity. Post results in your next post. Open a terminal and type in. Then copy and paste in code tags < between the code][/code > the readout in go advanced reply toolbar. It is the hashtag symbol on the tool bar.
Deepin is based on Ubuntu as far as I know. KDE is universal. I'd just make sure your found fix suggestions match the version of Ubuntu and KDE that you are using. I don't think this is software breakage though. But hardware breakage instead.
Edit: Forgot my manners. Howdy and Welcome to LQ.