x0vncserver: keyEvent(): use scancodes if available

Use the client provided (using QEMU extendend key event) scancodes if
available instead of reverse mapping the keysym.

X11 unfortunately uses keyboard driver specific keycodes and provides
no direct way to query this, so guess based on the keyboard mapping.

Handle the two most likely keyboard drivers, the old xorgkbd and evdev.

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
diff --git a/unix/x0vncserver/x0vncserver.man b/unix/x0vncserver/x0vncserver.man
index 095f6db..804a70f 100644
--- a/unix/x0vncserver/x0vncserver.man
+++ b/unix/x0vncserver/x0vncserver.man
@@ -168,6 +168,13 @@
 `greater than' characters).
 .
 .TP
+.B RawKeyboard
+Send keyboard events straight through and avoid mapping them to the current
+keyboard layout. This effectively makes the keyboard behave according to the
+layout configured on the server instead of the layout configured on the
+client. Default is off.
+.
+.TP
 .B Protocol3.3
 Always use RFB protocol version 3.3 for backwards compatibility with
 badly-behaved clients.  Default is off.