I am using Citrix to remotely access a machine running Windows 7 that runs Ubuntu in VirtualBox. The problem I ran into was repeating the characters everywhere. I tried a few things, but for me it worked as follows:
On your virtual machine (guest) type xset r off
xset r off
This will disable the replay.
This post helped me today, but I had to use a variation. If the virtual machine has only a terminal / console (no desktop environment), try the following:
setterm -repeat off