Update the keyboard driver on your Windows guest.
If there aren't any updates for your keyboard driver (or the update simply doesn't resolve anything), try installing the USB 2.0 pack into VirtualBox by following the steps below:
Before you start, make sure the guest isn't running and that you have a USB keyboard.
- Start VirtualBox, select the Windows XP guest in the left pane, and click Settings.
- In the Windows XP - Settings dialogue, select USB in the left pane.
- Tick Enable USB Controller and Enable USB 2.0 (EHCI) Controller.
- After you tick the second box, a dialogue should appear. Click the button that says something like "Install VirtualBox Pack" or something similar (I forgot).
- Click the download link for the VirtualBox Extension Pack.
- After you download the file, open it. VirtualBox should give a dialogue asking if you want to install the pack. Click the button that says "Yes" or something similar.
- Tick Enable USB 2.0 (EHCI) Controller again.
- Hit Alt+Insert and select your keyboard from the menu that pops up.
- Lastly, you start the Windows guest and tell me if this solution works.
Note: I never had a problem with the keyboard on my virtual machine, so you will have to bear with me.