Yes, it's not Mint or Ubuntu that is the problem . . it's your keyboard.
And now that I know it is a laptop, I suggest that it may be best to take it to a reputable repair shop, to be disassembled, and cleaned.
The owners manual may have suggestions/instructions to clean the keyboard too.