This could cause whatever you're emulating to need to be killed. Here's a patch that fixes it from the following thread: http://thread.gmane.org/gmane.comp.emulators.xmame.devel/5566
Created attachment 71615 [details, diff] xmess-0.101 Fix Mess Keyboard
in cvs. thanks for the bug report and patch.