Arrow keys output numbers when connecting to Ubuntu VirtualBox guest on Windows 7 host via remote desktop connection
The problem is that the NumLock state gets stuck to On inside the RDP client. Tools like numlockx don't help - the client returns the state back to On. It's not just the allow keys that stop working - Ins, Del, Home, End, PgUp and PgDown are affected as well. The solution I found is to remove all references to keypad keys affected by NumLock from the xmodmap settings. To do that, run on the guest

xmodmap -pke | sed 's/KP_\([^ ]*\) KP_.*/\1/' &gt; $HOME/.xmodmap


.xmodmap will be loaded on the next login. To load it immediately, run

xmodmap $HOME/.xmodmap


Alternatively, use the newer version of the RDP client (Microsoft Remote Desktop 10). It fixes the arrows. It's a full rewrite of Microsoft Remote Desktop, it has its own issues with the Insert key and middle mouse button.