I have a cursor/pointer that behaves as though it has St. Vitus Dance. The problem is that it jumps lines so that I type text in the wrong place and it often causes me to lose chunks of text because I inadvertently highlight and type over them. It is thoroughly maddening.
It is possible that a mouse or keyboard may be malfunctioning and causing a problem
but you did not say what hardware you have? Maybe cleaning a mouse, or borrowing another mouse or keyboard to test and possibly isolate the cause of a problem would be a good start. I'm not saying that this is definitely the cause, or that you should buy new ones.