Reminds me of an issue on Windows I just figured out. My keyboard input kept getting yanked to the other PC.
For some reason, my mouse cursor moves back and forth when I use the arrow keys. Been happening for a while, but whatever.
Magic Mouse (KBM emulator) at some point got configured so that holding ctrl-shift-mousemove would snap the mouse to the PC in that direction.
Sooo, Ctrl-Shift-Left (highlight previous word, something I would do frequently [like just now to highlight and italicize 'frequently']) would end up also moving the mouse left a few pixels... which would send the mouse and keyboard over to the other PC.
Took me a few weeks to track that one down.