I don't suppose you have something else wacky running in the background that might be monitoring those keys for some reason? Perhaps you can try running XP in safe mode? (I'm not sure DOSBox will run at all under such conditions, but it's worth a try.)

As a last resort there's probably a Live Linux CD that includes DOSBox. Maybe that's worth a try anyway, to see if DOSBox at least works properly under those clean conditions.