On Linux (at least), a key event is accompanied with a mouse position
event. If a libRocket UI is listening to e.g. "mouseover" events,
then any keypress will first appear to be a mouse movement, tripping
up code that tries to handle focus with both keyboard and mouse
support.
This change merely dispatches key events before any mouse events to
avoid this problem.
libRocket calls some keys "OEM" which map to ASCII characters in
non-predictable places. Since Panda3D is providing these values
to libRocket from well-known sources, it seems a lesser evil to
use the default US English mappings rather than losing the events
entirely.