I have had the same issue on my surface pro2. I have one of attachable keyboards. If it gets wonky I disconnect and reconnect it. Usually fixes the issue.
Have been playing with a bunch of Surface Pro 3 systems in the past week... they have the same issue, and solution, with the attachable keyboards...