Hello community,

here is the log from the commit of package xf86-input-keyboard for 
openSUSE:Factory checked in at 2013-11-26 06:14:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xf86-input-keyboard (Old)
 and      /work/SRC/openSUSE:Factory/.xf86-input-keyboard.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xf86-input-keyboard"

Changes:
--------
--- /work/SRC/openSUSE:Factory/xf86-input-keyboard/xf86-input-keyboard.changes  
2013-04-02 13:32:20.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.xf86-input-keyboard.new/xf86-input-keyboard.changes 
    2013-11-26 06:14:56.000000000 +0100
@@ -1,0 +2,8 @@
+Sun Nov  3 00:43:50 UTC 2013 - [email protected]
+
+- Update to version 1.8.0:
+  Consider this the NetBSD release, bringing the driver closer to sync with
+  the NetBSD source directory. Non-BSD platforms should not be affected by
+  these changes.
+
+-------------------------------------------------------------------

Old:
----
  xf86-input-keyboard-1.7.0.tar.bz2

New:
----
  xf86-input-keyboard-1.8.0.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xf86-input-keyboard.spec ++++++
--- /var/tmp/diff_new_pack.XyPGVt/_old  2013-11-26 06:14:57.000000000 +0100
+++ /var/tmp/diff_new_pack.XyPGVt/_new  2013-11-26 06:14:57.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           xf86-input-keyboard
-Version:        1.7.0
+Version:        1.8.0
 Release:        0
 Summary:        Keyboard input driver for the Xorg X server
 License:        GPL-2.0+

++++++ xf86-input-keyboard-1.7.0.tar.bz2 -> xf86-input-keyboard-1.8.0.tar.bz2 
++++++
++++ 2865 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-input-keyboard-1.7.0/ChangeLog new/xf86-input-keyboard-1.8.0/ChangeLog
--- old/xf86-input-keyboard-1.7.0/ChangeLog     2013-03-27 02:21:24.000000000 
+0100
+++ new/xf86-input-keyboard-1.8.0/ChangeLog     2013-11-01 00:46:34.000000000 
+0100
@@ -1,3 +1,311 @@
+commit ddeb7940b956682451392717b135be4454b5756e
+Author: Peter Hutterer <[email protected]>
+Date:   Fri Nov 1 09:45:21 2013 +1000
+
+    keyboard 1.8.0
+    
+    Signed-off-by: Peter Hutterer <[email protected]>
+
+commit 014101d157fb7eb54c79fecc424b53ca95f582bc
+Author: Thomas Klausner <[email protected]>
+Date:   Sun Oct 27 13:53:34 2013 +0100
+
+    Whitespace fixes.
+    
+    Replace <SPACE><TAB> with <TAB>.
+    Remove whitespace at end-of-line.
+    
+    Signed-off-by: Thomas Klausner <[email protected]>
+    Reviewed-by: Matthieu Herrb <[email protected]>
+    Signed-off-by: Peter Hutterer <[email protected]>
+
+commit b8f4e7065566512a123c4957ab432cad3e7c688e
+Author: Thomas Klausner <[email protected]>
+Date:   Tue Jul 30 15:07:31 2013 +0200
+
+    Check open() return value.
+    
+    Suggested by Walter Harms <[email protected]>.
+    
+    Signed-off-by: Thomas Klausner <[email protected]>
+    Signed-off-by: Gaetan Nadon <[email protected]>
+
+commit dc9486a22f4b7fec2860928c555636bfc9f58741
+Author: Thomas Klausner <[email protected]>
+Date:   Mon Jul 29 23:23:49 2013 +0200
+
+    Factor out common code.
+    
+    Suggested by Walter Harms <[email protected]>.
+    
+    Signed-off-by: Thomas Klausner <[email protected]>
+    Reviewed-by: Matthieu Herrb <[email protected]>
+    Signed-off-by: Gaetan Nadon <[email protected]>
+
+commit 2d6661d5c7aff662ad76ddb225664260f0a07a1e
+Author: Thomas Klausner <[email protected]>
+Date:   Mon Jul 29 23:23:48 2013 +0200
+
+    Do not assume type in WS_*_MAP_SIZE macros.
+    
+    Suggested by Walter Harms <[email protected]>.
+    
+    Signed-off-by: Thomas Klausner <[email protected]>
+    Reviewed-by: Matthieu Herrb <[email protected]>
+    Signed-off-by: Gaetan Nadon <[email protected]>
+
+commit 6042ab2647197d9aa09578ed1befe03931737f1c
+Author: Thomas Klausner <[email protected]>
+Date:   Mon Jul 29 23:23:47 2013 +0200
+
+    Add some NetBSD feature detection code.
+    
+    Signed-off-by: Thomas Klausner <[email protected]>
+    Reviewed-by: Matthieu Herrb <[email protected]>
+    Signed-off-by: Gaetan Nadon <[email protected]>
+
+commit 4f1a3cff9dfbfb33fcc6ff0a4ffd1db106301b97
+Author: Thomas Klausner <[email protected]>
+Date:   Mon Jul 29 23:23:46 2013 +0200
+
+    Move WSCONS case inside switch statement.
+    
+    Signed-off-by: Thomas Klausner <[email protected]>
+    Reviewed-by: Alan Coopersmith <[email protected]>
+    Reviewed-by: Matthieu Herrb <[email protected]>
+    Signed-off-by: Gaetan Nadon <[email protected]>
+
+commit 390c4621dd4e2f6070508796385e2d23e5418b89
+Author: Thomas Klausner <[email protected]>
+Date:   Mon Jul 29 23:23:45 2013 +0200
+
+    Improve auto-detection.
+    
+    If WSKBDIO_GTYPE succeeds and returns type=0, it is a mux with no
+    keyboard attached. In this case, assume USB.
+    
+    >From Jared McNeill <[email protected]>
+    Signed-off-by: Thomas Klausner <[email protected]>
+    Reviewed-by: Alan Coopersmith <[email protected]>
+    Reviewed-by: Matthieu Herrb <[email protected]>
+    Signed-off-by: Gaetan Nadon <[email protected]>
+
+commit 8ac42401a6db161e0983df17ac1787f164faf2f3
+Author: Thomas Klausner <[email protected]>
+Date:   Mon Jul 29 23:23:44 2013 +0200
+
+    Fix wskbd handling when VT switching.
+    
+    When using /dev/wskbd* we need to close the device when VT switching
+    out of X, and open it again when switching back.
+    
+    >From Michael Lorenz <[email protected]>
+    Signed-off-by: Thomas Klausner <[email protected]>
+    Reviewed-by: Matthieu Herrb <[email protected]>
+    Signed-off-by: Gaetan Nadon <[email protected]>
+
+commit d61dcfd5c297f405a4c200131e88e5dfc95bfa95
+Author: Thomas Klausner <[email protected]>
+Date:   Mon Jul 29 23:23:43 2013 +0200
+
+    Make OpenKeyboard() warn instead of error out.
+    
+    This way we can still setup keyboard map manually by xmodmap(1)
+    etc. on less well supported ports.
+    
+    >From Izumi Tsutsui <[email protected]>
+    Signed-off-by: Thomas Klausner <[email protected]>
+    Reviewed-by: Alan Coopersmith <[email protected]>
+    Reviewed-by: Matthieu Herrb <[email protected]>
+    Signed-off-by: Gaetan Nadon <[email protected]>
+
+commit e511907a5f7047a9c14b378084525137510511f5
+Author: Thomas Klausner <[email protected]>
+Date:   Mon Jul 29 23:23:42 2013 +0200
+
+    Add WSKBD_TYPE_LK201.
+    
+    Signed-off-by: Thomas Klausner <[email protected]>
+    Reviewed-by: Alan Coopersmith <[email protected]>
+    Reviewed-by: Matthieu Herrb <[email protected]>
+    Signed-off-by: Gaetan Nadon <[email protected]>
+
+commit e5ecacb20ad3685d6f422c5ed21632fb8b1f7fa0
+Author: Thomas Klausner <[email protected]>
+Date:   Mon Jul 29 23:23:41 2013 +0200
+
+    Add default device for Protocol "wskbd".
+    
+    Signed-off-by: Thomas Klausner <[email protected]>
+    Reviewed-by: Mark Kettenis <[email protected]>
+    Reviewed-by: Matthieu Herrb <[email protected]>
+    Signed-off-by: Gaetan Nadon <[email protected]>
+
+commit 8879a7682ef94471e907bb660d2b96cc95ed7b81
+Author: Thomas Klausner <[email protected]>
+Date:   Mon Jul 29 23:23:40 2013 +0200
+
+    Recognize WSKBD_TYPE_MAPLE for dreamcast.
+    
+    Signed-off-by: Thomas Klausner <[email protected]>
+    Reviewed-by: Alan Coopersmith <[email protected]>
+    Reviewed-by: Matthieu Herrb <[email protected]>
+    Signed-off-by: Gaetan Nadon <[email protected]>
+
+commit f105a796ae29eaaae7c25447734013537fad2a87
+Author: Thomas Klausner <[email protected]>
+Date:   Mon Jul 29 23:23:39 2013 +0200
+
+    Fix a shadowing warning, and add const.
+    
+    Signed-off-by: Thomas Klausner <[email protected]>
+    Reviewed-by: Alan Coopersmith <[email protected]>
+    Reviewed-by: Matthieu Herrb <[email protected]>
+    Signed-off-by: Gaetan Nadon <[email protected]>
+
+commit c783746c4f72249645e43c6d96d08cb6c74812d0
+Author: Thomas Klausner <[email protected]>
+Date:   Mon Jul 29 23:23:38 2013 +0200
+
+    Set the version for the keyboard.
+    
+    Signed-off-by: Thomas Klausner <[email protected]>
+    Reviewed-by: Matthieu Herrb <[email protected]>
+    Signed-off-by: Gaetan Nadon <[email protected]>
+
+commit 83faa4123ae5d182f936faab77925d45da181f5f
+Author: Thomas Klausner <[email protected]>
+Date:   Mon Jul 29 23:23:37 2013 +0200
+
+    Add a basic map for an LK201 keyboard.
+    
+    Signed-off-by: Thomas Klausner <[email protected]>
+    Reviewed-by: Alan Coopersmith <[email protected]>
+    Reviewed-by: Matthieu Herrb <[email protected]>
+    Signed-off-by: Gaetan Nadon <[email protected]>
+
+commit e7ba236dbaf8df9364bf61ef5c3d67d377fbd2ec
+Author: Thomas Klausner <[email protected]>
+Date:   Mon Jul 29 23:23:36 2013 +0200
+
+    Fix scan code 50 key on non-US-USB keyboards.
+    
+    Signed-off-by: Thomas Klausner <[email protected]>
+    Reviewed-by: Alan Coopersmith <[email protected]>
+    Reviewed-by: Matthieu Herrb <[email protected]>
+    Signed-off-by: Gaetan Nadon <[email protected]>
+
+commit 60d947b34830b850d53de1ee756502c471796fa9
+Author: Thomas Klausner <[email protected]>
+Date:   Mon Jul 29 23:23:35 2013 +0200
+
+    Add a couple mappings for keys found on Sun keyboards.
+    
+    Signed-off-by: Thomas Klausner <[email protected]>
+    Reviewed-by: Alan Coopersmith <[email protected]>
+    Reviewed-by: Matthieu Herrb <[email protected]>
+    Signed-off-by: Gaetan Nadon <[email protected]>
+
+commit 0baa215b57d104bf22bc9a179bae3ff413bf055c
+Author: Thomas Klausner <[email protected]>
+Date:   Mon Jul 29 23:23:34 2013 +0200
+
+    Use existing wscons USB keymap for WSKBD_TYPE_MAPLE on dreamcast.
+    
+    Signed-off-by: Thomas Klausner <[email protected]>
+    Reviewed-by: Matthieu Herrb <[email protected]>
+    Signed-off-by: Gaetan Nadon <[email protected]>
+
+commit 9c6acb2a2a4806d14ce84dcd1fb81268359dbe35
+Author: Thomas Klausner <[email protected]>
+Date:   Mon Jul 29 23:23:33 2013 +0200
+
+    Add translation table for AT/PS2 pseudo XT scancodes.
+    
+    Add another translation table to make the modular kbd driver cope with 
NetBSD's
+    AT/PS2 pseudo XT scancodes. Tested on shark and sgimips with an IBM Model 
M -
+    this should be tested with more keyboards, there might still be errors in 
the
+    table.
+    
+    >From Michael Lorenz <[email protected]>
+    Signed-off-by: Thomas Klausner <[email protected]>
+    Reviewed-by: Alan Coopersmith <[email protected]>
+    Reviewed-by: Matthieu Herrb <[email protected]>
+    Signed-off-by: Gaetan Nadon <[email protected]>
+
+commit e7a1f964782817acc4807beddc6e6ef1c8d94c96
+Author: Thomas Klausner <[email protected]>
+Date:   Mon Jul 29 23:23:32 2013 +0200
+
+    More ADB fixes.
+    
+    Signed-off-by: Thomas Klausner <[email protected]>
+    Reviewed-by: Alan Coopersmith <[email protected]>
+    Reviewed-by: Matthieu Herrb <[email protected]>
+    Signed-off-by: Gaetan Nadon <[email protected]>
+
+commit 42b22d5dc3892309d276df131d35951a79311843
+Author: Thomas Klausner <[email protected]>
+Date:   Mon Jul 29 23:23:31 2013 +0200
+
+    Fixes for the ADB map.
+    
+    - map the backspace key to KEY_BackSpace
+    - swap LAlt and LMeta to match the keyboard (Alt=Alt/Option, Meta=Command)
+    - add a keysym for . on the number pad
+    ... so killing the Xserver with Ctrl-Alt-BackSpace works now and the 
default
+    map matches an US keyboard without any xmodmap stunts.
+    
+    >From Michael Lorenz <[email protected]>
+    Signed-off-by: Thomas Klausner <[email protected]>
+    Reviewed-by: Alan Coopersmith <[email protected]>
+    Reviewed-by: Matthieu Herrb <[email protected]>
+    Signed-off-by: Gaetan Nadon <[email protected]>
+
+commit b8e12ae87352922eaea305f66ca232ea2a3b2d61
+Author: Thomas Klausner <[email protected]>
+Date:   Mon Jul 29 23:23:30 2013 +0200
+
+    Added keysyms for extra keys on Sun Type 6 USB keyboard.
+    
+    Signed-off-by: Thomas Klausner <[email protected]>
+    Reviewed-by: Alan Coopersmith <[email protected]>
+    Reviewed-by: Matthieu Herrb <[email protected]>
+    Signed-off-by: Gaetan Nadon <[email protected]>
+
+commit ad527f5c25984fa023f1be9fcb8e953aa7459e8a
+Author: Thomas Klausner <[email protected]>
+Date:   Mon Jul 29 23:23:29 2013 +0200
+
+    Added keysym for Power keys.
+    
+    Signed-off-by: Thomas Klausner <[email protected]>
+    Reviewed-by: Alan Coopersmith <[email protected]>
+    Reviewed-by: Matthieu Herrb <[email protected]>
+    Signed-off-by: Gaetan Nadon <[email protected]>
+
+commit a0eec5ddd0f3b1a23f5fcbaf85cd34680a1944fc
+Author: Thomas Klausner <[email protected]>
+Date:   Mon Jul 29 23:23:28 2013 +0200
+
+    Map the Sun keyboard "help" key.
+    
+    Signed-off-by: Thomas Klausner <[email protected]>
+    Reviewed-by: Alan Coopersmith <[email protected]>
+    Reviewed-by: Matthieu Herrb <[email protected]>
+    Signed-off-by: Gaetan Nadon <[email protected]>
+
+commit 2d5bc7db251facdb2bb478eaad1dfd820cf28d13
+Author: Thomas Klausner <[email protected]>
+Date:   Mon Jul 29 23:23:27 2013 +0200
+
+    Added some missing keysyms to the ADB keymap.
+    
+    Signed-off-by: Thomas Klausner <[email protected]>
+    Reviewed-by: Alan Coopersmith <[email protected]>
+    Reviewed-by: Matthieu Herrb <[email protected]>
+    Signed-off-by: Gaetan Nadon <[email protected]>
+
 commit ec3ccb22d4e7348ac537100fcb1b7ddc07df57b8
 Author: Peter Hutterer <[email protected]>
 Date:   Wed Mar 27 11:13:18 2013 +1000
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-input-keyboard-1.7.0/configure.ac 
new/xf86-input-keyboard-1.8.0/configure.ac
--- old/xf86-input-keyboard-1.7.0/configure.ac  2013-03-27 02:11:17.000000000 
+0100
+++ new/xf86-input-keyboard-1.8.0/configure.ac  2013-11-01 00:44:16.000000000 
+0100
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-input-keyboard],
-        [1.7.0],
+        [1.8.0],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-input-keyboard])
 AC_CONFIG_SRCDIR([Makefile.am])
@@ -79,6 +79,22 @@
                   porting it.])
     ;;
 esac
+case $host_os in
+  netbsd*)
+    case $host in
+      *powerpc-*|*sparc-*|*sparc64-*|*vax-*)
+        OS_FLAGS="$OS_FLAGS -DDEFAULT_TO_WSKBD"
+        ;;
+    esac
+    case "$(uname -m 2>&1)" in
+      evbarm|sgimips|shark)
+        OS_FLAGS="$OS_FLAGS -DDEFAULT_TO_WSKBD"
+        ;;
+    esac
+    ;;
+esac
+AC_SUBST([OS_FLAGS])
+
 AM_CONDITIONAL(LINUX, [test "x$IS_LINUX" = xyes])
 AM_CONDITIONAL(BSD, [test "x$IS_BSD" = xyes])
 AM_CONDITIONAL(SOLARIS, [test "x$IS_SOLARIS" = xyes])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-input-keyboard-1.7.0/src/Makefile.am 
new/xf86-input-keyboard-1.8.0/src/Makefile.am
--- old/xf86-input-keyboard-1.7.0/src/Makefile.am       2012-07-27 
06:13:58.000000000 +0200
+++ new/xf86-input-keyboard-1.8.0/src/Makefile.am       2013-10-28 
01:44:15.000000000 +0100
@@ -18,7 +18,7 @@
 #  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 #  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS)
+AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS) $(OS_FLAGS)
 
 kbd_drv_la_LTLIBRARIES = kbd_drv.la
 kbd_drv_la_LDFLAGS = -avoid-version -module
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-input-keyboard-1.7.0/src/bsd_KbdMap.c 
new/xf86-input-keyboard-1.8.0/src/bsd_KbdMap.c
--- old/xf86-input-keyboard-1.7.0/src/bsd_KbdMap.c      2012-08-17 
06:11:18.000000000 +0200
+++ new/xf86-input-keyboard-1.8.0/src/bsd_KbdMap.c      2013-10-28 
01:44:15.000000000 +0100
@@ -260,7 +260,7 @@
        /* 47 */ KEY_LBrace,    /* [ { */
        /* 48 */ KEY_RBrace,    /* ] } */
        /* 49 */ KEY_BSlash,    /* \ | */
-       /* 50 */ KEY_BSlash2,   /* \ _ # ~ on some keyboards */
+       /* 50 */ KEY_BSlash,    /* \ _ # ~ on some keyboards */
        /* 51 */ KEY_SemiColon, /* ; : */
        /* 52 */ KEY_Quote,     /* ' " */
        /* 53 */ KEY_Tilde,     /* ` ~ */
@@ -312,34 +312,34 @@
        /* 99 */ KEY_KP_Decimal,        /* Keypad . Del */
        /* 100 */ KEY_Less,     /* < > on some keyboards */
        /* 101 */ KEY_Menu,     /* Menu */
-       /* 102 */ KEY_NOTUSED,
+       /* 102 */ KEY_Power,    /* sleep key on Sun USB */
        /* 103 */ KEY_KP_Equal, /* Keypad = on Mac keyboards */
-       /* 104 */ KEY_NOTUSED,
-       /* 105 */ KEY_NOTUSED,
-       /* 106 */ KEY_NOTUSED,
-       /* 107 */ KEY_NOTUSED,
+       /* 104 */ KEY_F13,
+       /* 105 */ KEY_F14,
+       /* 106 */ KEY_F15,
+       /* 107 */ KEY_F16,
        /* 108 */ KEY_NOTUSED,
-       /* 109 */ KEY_NOTUSED,
+       /* 109 */ KEY_Power,
        /* 110 */ KEY_NOTUSED,
        /* 111 */ KEY_NOTUSED,
        /* 112 */ KEY_NOTUSED,
        /* 113 */ KEY_NOTUSED,
        /* 114 */ KEY_NOTUSED,
        /* 115 */ KEY_NOTUSED,
-       /* 116 */ KEY_NOTUSED,
-       /* 117 */ KEY_NOTUSED,
-       /* 118 */ KEY_NOTUSED,
-       /* 119 */ KEY_NOTUSED,
-       /* 120 */ KEY_NOTUSED,
-       /* 121 */ KEY_NOTUSED,
-       /* 122 */ KEY_NOTUSED,
-       /* 123 */ KEY_NOTUSED,
-       /* 124 */ KEY_NOTUSED,
-       /* 125 */ KEY_NOTUSED,
-       /* 126 */ KEY_NOTUSED,
-       /* 127 */ KEY_NOTUSED,
-       /* 128 */ KEY_NOTUSED,
-       /* 129 */ KEY_NOTUSED,
+       /* 116 */ KEY_L7,
+       /* 117 */ KEY_Help,
+       /* 118 */ KEY_L3,
+       /* 119 */ KEY_L5,
+       /* 120 */ KEY_L1,
+       /* 121 */ KEY_L2,
+       /* 122 */ KEY_L4,
+       /* 123 */ KEY_L10,
+       /* 124 */ KEY_L6,
+       /* 125 */ KEY_L8,
+       /* 126 */ KEY_L9,
+       /* 127 */ KEY_Mute,
+       /* 128 */ KEY_AudioRaise,
+       /* 129 */ KEY_AudioLower,
        /* 130 */ KEY_NOTUSED,
        /* 131 */ KEY_NOTUSED,
        /* 132 */ KEY_NOTUSED,
@@ -443,7 +443,7 @@
        /* 230 */ KEY_AltLang,  /* Right Alt, AKA AltGr */
        /* 231 */ KEY_LMeta,    /* Right Meta XXX */
 };
-#define WS_USB_MAP_SIZE (sizeof(wsUsbMap)/sizeof(unsigned char))
+#define WS_USB_MAP_SIZE (sizeof(wsUsbMap)/sizeof(*wsUsbMap))
 
 static
 TransMapRec wsUsb = {
@@ -452,6 +452,239 @@
     wsUsbMap
 };
 
+static CARD8 wsXtMap[] = {
+       /* 0 */ KEY_NOTUSED,
+       /* 1 */ KEY_Escape,
+       /* 2 */ KEY_1,
+       /* 3 */ KEY_2,
+       /* 4 */ KEY_3,
+       /* 5 */ KEY_4,
+       /* 6 */ KEY_5,
+       /* 7 */ KEY_6,
+       /* 8 */ KEY_7,
+       /* 9 */ KEY_8,
+       /* 10 */ KEY_9,
+       /* 11 */ KEY_0,
+       /* 12 */ KEY_Minus,
+       /* 13 */ KEY_Equal,
+       /* 14 */ KEY_BackSpace,
+       /* 15 */ KEY_Tab,
+       /* 16 */ KEY_Q,
+       /* 17 */ KEY_W,
+       /* 18 */ KEY_E,
+       /* 19 */ KEY_R,
+       /* 20 */ KEY_T,
+       /* 21 */ KEY_Y,
+       /* 22 */ KEY_U,
+       /* 23 */ KEY_I,
+       /* 24 */ KEY_O,
+       /* 25 */ KEY_P,
+       /* 26 */ KEY_LBrace,
+       /* 27 */ KEY_RBrace,
+       /* 28 */ KEY_Enter,
+       /* 29 */ KEY_LCtrl,
+       /* 30 */ KEY_A,
+       /* 31 */ KEY_S,
+       /* 32 */ KEY_D,
+       /* 33 */ KEY_F,
+       /* 34 */ KEY_G,
+       /* 35 */ KEY_H,
+       /* 36 */ KEY_J,
+       /* 37 */ KEY_K,
+       /* 38 */ KEY_L,
+       /* 39 */ KEY_SemiColon,
+       /* 40 */ KEY_Quote,
+       /* 41 */ KEY_Tilde,
+       /* 42 */ KEY_ShiftL,
+       /* 43 */ KEY_BSlash,
+       /* 44 */ KEY_Z,
+       /* 45 */ KEY_X,
+       /* 46 */ KEY_C,
+       /* 47 */ KEY_V,
+       /* 48 */ KEY_B,
+       /* 49 */ KEY_N,
+       /* 50 */ KEY_M,
+       /* 51 */ KEY_Comma,
+       /* 52 */ KEY_Period,
+       /* 53 */ KEY_Slash,
+       /* 54 */ KEY_ShiftR,
+       /* 55 */ KEY_KP_Multiply,
+       /* 56 */ KEY_Alt,
+       /* 57 */ KEY_Space,
+       /* 58 */ KEY_CapsLock,
+       /* 59 */ KEY_F1,
+       /* 60 */ KEY_F2,
+       /* 61 */ KEY_F3,
+       /* 62 */ KEY_F4,
+       /* 63 */ KEY_F5,
+       /* 64 */ KEY_F6,
+       /* 65 */ KEY_F7,
+       /* 66 */ KEY_F8,
+       /* 67 */ KEY_F9,
+       /* 68 */ KEY_F10,
+       /* 69 */ KEY_NumLock,
+       /* 70 */ KEY_ScrollLock,
+       /* 71 */ KEY_KP_7,
+       /* 72 */ KEY_KP_8,
+       /* 73 */ KEY_KP_9,
+       /* 74 */ KEY_KP_Minus,
+       /* 75 */ KEY_KP_4,
+       /* 76 */ KEY_KP_5,
+       /* 77 */ KEY_KP_6,
+       /* 78 */ KEY_KP_Plus,
+       /* 79 */ KEY_KP_1,
+       /* 80 */ KEY_KP_2,
+       /* 81 */ KEY_KP_3,
+       /* 82 */ KEY_KP_0,
+       /* 83 */ KEY_KP_Decimal,
+       /* 84 */ KEY_NOTUSED,
+       /* 85 */ KEY_NOTUSED,
+       /* 86 */ KEY_Less,      /* backslash on uk, < on german */
+       /* 87 */ KEY_F11,
+       /* 88 */ KEY_F12,
+       /* 89 */ KEY_NOTUSED,
+       /* 90 */ KEY_NOTUSED,
+       /* 91 */ KEY_NOTUSED,
+       /* 92 */ KEY_NOTUSED,
+       /* 93 */ KEY_NOTUSED,
+       /* 94 */ KEY_NOTUSED,
+       /* 95 */ KEY_NOTUSED,
+       /* 96 */ KEY_NOTUSED,
+       /* 97 */ KEY_NOTUSED,
+       /* 98 */ KEY_NOTUSED,
+       /* 99 */ KEY_NOTUSED,
+       /* 100 */ KEY_NOTUSED,
+       /* 101 */ KEY_NOTUSED,
+       /* 102 */ KEY_NOTUSED,
+       /* 103 */ KEY_NOTUSED,
+       /* 104 */ KEY_NOTUSED,
+       /* 105 */ KEY_NOTUSED,
+       /* 106 */ KEY_NOTUSED,
+       /* 107 */ KEY_NOTUSED,
+       /* 108 */ KEY_NOTUSED,
+       /* 109 */ KEY_NOTUSED,
+       /* 110 */ KEY_NOTUSED,
+       /* 111 */ KEY_NOTUSED,
+       /* 112 */ KEY_NOTUSED,
+       /* 113 */ KEY_NOTUSED,
+       /* 114 */ KEY_NOTUSED,
+       /* 115 */ KEY_NOTUSED,
+       /* 116 */ KEY_NOTUSED,
+       /* 117 */ KEY_NOTUSED,
+       /* 118 */ KEY_NOTUSED,
+       /* 119 */ KEY_NOTUSED,
+       /* 120 */ KEY_NOTUSED,
+       /* 121 */ KEY_NOTUSED,
+       /* 122 */ KEY_NOTUSED,
+       /* 123 */ KEY_NOTUSED,
+       /* 124 */ KEY_NOTUSED,
+       /* 125 */ KEY_NOTUSED,
+       /* 126 */ KEY_NOTUSED,
+       /* 127 */ KEY_Pause,
+       /* 128 */ KEY_NOTUSED,
+       /* 129 */ KEY_NOTUSED,
+       /* 130 */ KEY_NOTUSED,
+       /* 131 */ KEY_NOTUSED,
+       /* 132 */ KEY_NOTUSED,
+       /* 133 */ KEY_NOTUSED,
+       /* 134 */ KEY_NOTUSED,
+       /* 135 */ KEY_NOTUSED,
+       /* 136 */ KEY_NOTUSED,
+       /* 137 */ KEY_NOTUSED,
+       /* 138 */ KEY_NOTUSED,
+       /* 139 */ KEY_NOTUSED,
+       /* 140 */ KEY_NOTUSED,
+       /* 141 */ KEY_NOTUSED,
+       /* 142 */ KEY_NOTUSED,
+       /* 143 */ KEY_NOTUSED,
+       /* 144 */ KEY_NOTUSED,
+       /* 145 */ KEY_NOTUSED,
+       /* 146 */ KEY_NOTUSED,
+       /* 147 */ KEY_NOTUSED,
+       /* 148 */ KEY_NOTUSED,
+       /* 149 */ KEY_NOTUSED,
+       /* 150 */ KEY_NOTUSED,
+       /* 151 */ KEY_NOTUSED,
+       /* 152 */ KEY_NOTUSED,
+       /* 153 */ KEY_NOTUSED,
+       /* 154 */ KEY_NOTUSED,
+       /* 155 */ KEY_NOTUSED,
+       /* 156 */ KEY_KP_Enter,
+       /* 157 */ KEY_RCtrl,
+       /* 158 */ KEY_NOTUSED,
+       /* 159 */ KEY_NOTUSED,
+       /* 160 */ KEY_Mute,
+       /* 161 */ KEY_NOTUSED,
+       /* 162 */ KEY_NOTUSED,
+       /* 163 */ KEY_NOTUSED,
+       /* 164 */ KEY_NOTUSED,
+       /* 165 */ KEY_NOTUSED,
+       /* 166 */ KEY_NOTUSED,
+       /* 167 */ KEY_NOTUSED,
+       /* 168 */ KEY_NOTUSED,
+       /* 169 */ KEY_NOTUSED,
+       /* 170 */ KEY_Print,
+       /* 171 */ KEY_NOTUSED,
+       /* 172 */ KEY_NOTUSED,
+       /* 173 */ KEY_NOTUSED,
+       /* 174 */ KEY_AudioLower,
+       /* 175 */ KEY_AudioRaise,
+       /* 176 */ KEY_NOTUSED,
+       /* 177 */ KEY_NOTUSED,
+       /* 178 */ KEY_NOTUSED,
+       /* 179 */ KEY_NOTUSED,
+       /* 180 */ KEY_NOTUSED,
+       /* 181 */ KEY_KP_Divide,
+       /* 182 */ KEY_NOTUSED,
+       /* 183 */ KEY_Print,
+       /* 184 */ KEY_AltLang,
+       /* 185 */ KEY_NOTUSED,
+       /* 186 */ KEY_NOTUSED,
+       /* 187 */ KEY_NOTUSED,
+       /* 188 */ KEY_NOTUSED,
+       /* 189 */ KEY_NOTUSED,
+       /* 190 */ KEY_NOTUSED,
+       /* 191 */ KEY_NOTUSED,
+       /* 192 */ KEY_NOTUSED,
+       /* 193 */ KEY_NOTUSED,
+       /* 194 */ KEY_NOTUSED,
+       /* 195 */ KEY_NOTUSED,
+       /* 196 */ KEY_NOTUSED,
+       /* 197 */ KEY_NOTUSED,
+       /* 198 */ KEY_NOTUSED,
+       /* 199 */ KEY_Home,
+       /* 200 */ KEY_Up,
+       /* 201 */ KEY_PgUp,
+       /* 202 */ KEY_NOTUSED,
+       /* 203 */ KEY_Left,
+       /* 204 */ KEY_NOTUSED,
+       /* 205 */ KEY_Right,
+       /* 206 */ KEY_NOTUSED,
+       /* 207 */ KEY_End,
+       /* 208 */ KEY_Down,
+       /* 209 */ KEY_PgDown,
+       /* 210 */ KEY_Insert,
+       /* 211 */ KEY_Delete,
+       /* 212 */ KEY_NOTUSED,
+       /* 213 */ KEY_NOTUSED,
+       /* 214 */ KEY_NOTUSED,
+       /* 215 */ KEY_NOTUSED,
+       /* 216 */ KEY_NOTUSED,
+       /* 217 */ KEY_NOTUSED,
+       /* 218 */ KEY_NOTUSED,
+       /* 219 */ KEY_LMeta,
+       /* 220 */ KEY_RMeta,
+       /* 221 */ KEY_Menu,
+};
+#define WS_XT_MAP_SIZE (sizeof(wsXtMap)/sizeof(*wsXtMap))
+
+static
+TransMapRec wsXt = {
+    0,
+    WS_XT_MAP_SIZE,
+    wsXtMap
+};
+
 /* Map for adb keyboards  */
 static CARD8 wsAdbMap[] = {
        /* 0 */ KEY_A,
@@ -505,14 +738,14 @@
        /* 48 */ KEY_Tab,
        /* 49 */ KEY_Space,
        /* 50 */ KEY_Tilde,
-       /* 51 */ KEY_Delete,
+       /* 51 */ KEY_BackSpace,
        /* 52 */ KEY_AltLang,
        /* 53 */ KEY_Escape,
        /* 54 */ KEY_LCtrl,
-       /* 55 */ KEY_Alt,
+       /* 55 */ KEY_LMeta,
        /* 56 */ KEY_ShiftL,
        /* 57 */ KEY_CapsLock,
-       /* 58 */ KEY_LMeta,
+       /* 58 */ KEY_Alt,
        /* 59 */ KEY_Left,
        /* 60 */ KEY_Right,
        /* 61 */ KEY_Down,
@@ -525,7 +758,7 @@
        /* 68 */ KEY_NOTUSED,
        /* 69 */ KEY_KP_Plus,
        /* 70 */ KEY_NOTUSED,
-       /* 71 */ KEY_UNKNOWN,   /* Clear */
+       /* 71 */ KEY_NumLock,   /* Clear */
        /* 72 */ KEY_NOTUSED, 
        /* 73 */ KEY_NOTUSED,
        /* 74 */ KEY_NOTUSED,
@@ -549,7 +782,7 @@
        /* 92 */ KEY_KP_9,
        /* 93 */ KEY_NOTUSED,
        /* 94 */ KEY_NOTUSED,
-       /* 95 */ KEY_UNKNOWN,   /* Keypad ,  */
+       /* 95 */ KEY_KP_Decimal,        /* Keypad ,  */
        /* 96 */ KEY_F5,
        /* 97 */ KEY_F6,
        /* 98 */ KEY_F7,
@@ -559,26 +792,31 @@
        /* 102 */ KEY_NOTUSED,
        /* 103 */ KEY_F11,
        /* 104 */ KEY_NOTUSED,
-       /* 105 */ KEY_NOTUSED,
+       /* 105 */ KEY_Print,
        /* 106 */ KEY_KP_Enter,
-       /* 107 */ KEY_NOTUSED,
+       /* 107 */ KEY_ScrollLock,
        /* 108 */ KEY_NOTUSED,
        /* 109 */ KEY_F10,
        /* 110 */ KEY_NOTUSED,
        /* 111 */ KEY_F12,
        /* 112 */ KEY_NOTUSED,
-       /* 113 */ KEY_NOTUSED,
-       /* 114 */ KEY_NOTUSED,
+       /* 113 */ KEY_Pause,
+       /* 114 */ KEY_Insert,
        /* 115 */ KEY_Home,
        /* 116 */ KEY_PgUp,
-       /* 117 */ KEY_NOTUSED,
+       /* 117 */ KEY_Delete,
        /* 118 */ KEY_F4,
        /* 119 */ KEY_End,
        /* 120 */ KEY_F2,
        /* 121 */ KEY_PgDown,
-       /* 122 */ KEY_F1
+       /* 122 */ KEY_F1,
+       /* 123 */ KEY_NOTUSED,
+       /* 124 */ KEY_NOTUSED,
+       /* 125 */ KEY_NOTUSED,
+       /* 126 */ KEY_NOTUSED,
+       /* 127 */ KEY_Power
 };
-#define WS_ADB_MAP_SIZE (sizeof(wsAdbMap)/sizeof(unsigned char))
+#define WS_ADB_MAP_SIZE (sizeof(wsAdbMap)/sizeof(*wsAdbMap))
 
 static
 TransMapRec wsAdb = {
@@ -587,6 +825,270 @@
     wsAdbMap
 };
 
+/* Map for LK201 keyboards  */
+static CARD8 wsLk201Map[] = {
+       /* 0 */ KEY_F1,
+       /* 1 */ KEY_F2,
+       /* 2 */ KEY_F3,
+       /* 3 */ KEY_F4,
+       /* 4 */ KEY_F5,
+       /* 5 */ KEY_NOTUSED,
+       /* 6 */ KEY_NOTUSED,
+       /* 7 */ KEY_NOTUSED,
+       /* 8 */ KEY_NOTUSED,
+       /* 9 */ KEY_NOTUSED,
+       /* 10 */ KEY_NOTUSED,
+       /* 11 */ KEY_NOTUSED,
+       /* 12 */ KEY_NOTUSED,
+       /* 13 */ KEY_NOTUSED,
+       /* 14 */ KEY_F6,
+       /* 15 */ KEY_F7,
+       /* 16 */ KEY_F8,
+       /* 17 */ KEY_F9,
+       /* 18 */ KEY_F10,
+       /* 19 */ KEY_NOTUSED,
+       /* 20 */ KEY_NOTUSED,
+       /* 21 */ KEY_NOTUSED,
+       /* 22 */ KEY_NOTUSED,
+       /* 23 */ KEY_NOTUSED,
+       /* 24 */ KEY_NOTUSED,
+       /* 25 */ KEY_NOTUSED,
+       /* 26 */ KEY_NOTUSED,
+       /* 27 */ KEY_F11,
+       /* 28 */ KEY_F12,
+       /* 29 */ KEY_F13,
+       /* 30 */ KEY_F14,
+       /* 31 */ KEY_NOTUSED,
+       /* 32 */ KEY_NOTUSED,
+       /* 33 */ KEY_NOTUSED,
+       /* 34 */ KEY_NOTUSED,
+       /* 35 */ KEY_NOTUSED,
+       /* 36 */ KEY_NOTUSED,
+       /* 37 */ KEY_NOTUSED,
+       /* 38 */ KEY_Help,
+       /* 39 */ KEY_F16,       /* Do */
+       /* 40 */ KEY_NOTUSED,
+       /* 41 */ KEY_NOTUSED,
+       /* 42 */ KEY_F17,
+       /* 43 */ KEY_L8,        /* F18 */
+       /* 44 */ KEY_L9,        /* F19 */
+       /* 45 */ KEY_L10,       /* F20 */
+       /* 46 */ KEY_NOTUSED,
+       /* 47 */ KEY_NOTUSED,
+       /* 48 */ KEY_NOTUSED,
+       /* 49 */ KEY_NOTUSED,
+       /* 50 */ KEY_NOTUSED,
+       /* 51 */ KEY_NOTUSED,
+       /* 52 */ KEY_Home,      /* Find */
+       /* 53 */ KEY_Insert,    /* Insert Here */
+       /* 54 */ KEY_Delete,    /* Re-move */
+       /* 55 */ KEY_End,       /* Select */
+       /* 56 */ KEY_PgUp,      /* Prev-Screen */
+       /* 57 */ KEY_PgDown,    /* Next-Screen */
+       /* 58 */ KEY_NOTUSED,
+       /* 59 */ KEY_NOTUSED,
+       /* 60 */ KEY_KP_0,
+       /* 61 */ KEY_NOTUSED,
+       /* 62 */ KEY_KP_Decimal,
+       /* 63 */ KEY_KP_Enter,
+       /* 64 */ KEY_KP_1,
+       /* 65 */ KEY_KP_2,
+       /* 66 */ KEY_KP_3,
+       /* 67 */ KEY_KP_4,
+       /* 68 */ KEY_KP_5,
+       /* 69 */ KEY_KP_6,
+       /* 70 */ KEY_KP_Plus,   /* KP Comma */
+       /* 71 */ KEY_KP_7,
+       /* 72 */ KEY_KP_8,
+       /* 73 */ KEY_KP_9,
+       /* 74 */ KEY_KP_Minus,
+       /* 75 */ KEY_L1,        /* PF1 */
+       /* 76 */ KEY_L2,        /* PF2 */
+       /* 77 */ KEY_L3,        /* PF3 */
+       /* 78 */ KEY_L4,        /* PF4 */
+       /* 79 */ KEY_NOTUSED,
+       /* 80 */ KEY_NOTUSED,
+       /* 81 */ KEY_Left,
+       /* 82 */ KEY_Right,
+       /* 83 */ KEY_Down,
+       /* 84 */ KEY_Up,
+       /* 85 */ KEY_NOTUSED,
+       /* 86 */ KEY_NOTUSED,
+       /* 87 */ KEY_NOTUSED,
+       /* 88 */ KEY_ShiftL,
+       /* 89 */ KEY_LCtrl,
+       /* 90 */ KEY_CapsLock,
+       /* 91 */ KEY_Alt,       /* Compose */
+       /* 92 */ KEY_NOTUSED,
+       /* 93 */ KEY_NOTUSED,
+       /* 94 */ KEY_NOTUSED,
+       /* 95 */ KEY_NOTUSED,
+       /* 96 */ KEY_NOTUSED,
+       /* 97 */ KEY_NOTUSED,
+       /* 98 */ KEY_NOTUSED,
+       /* 99 */ KEY_NOTUSED,
+       /* 100 */ KEY_NOTUSED,
+       /* 101 */ KEY_NOTUSED,
+       /* 102 */ KEY_Delete,
+       /* 103 */ KEY_Enter,
+       /* 104 */ KEY_Tab,
+       /* 105 */ KEY_Escape, /* tilde */
+       /* 106 */ KEY_1,
+       /* 107 */ KEY_Q,
+       /* 108 */ KEY_A,
+       /* 109 */ KEY_Z,
+       /* 110 */ KEY_NOTUSED,
+       /* 111 */ KEY_2,
+       /* 112 */ KEY_W,
+       /* 113 */ KEY_S,
+       /* 114 */ KEY_X,
+       /* 115 */ KEY_Less,
+       /* 116 */ KEY_NOTUSED,
+       /* 117 */ KEY_3,
+       /* 118 */ KEY_E,
+       /* 119 */ KEY_D,
+       /* 120 */ KEY_C,
+       /* 121 */ KEY_NOTUSED,
+       /* 122 */ KEY_4,
+       /* 123 */ KEY_R,
+       /* 124 */ KEY_F,
+       /* 125 */ KEY_V,
+       /* 126 */ KEY_Space,
+       /* 127 */ KEY_NOTUSED,
+       /* 128 */ KEY_5,
+       /* 129 */ KEY_T,
+       /* 130 */ KEY_G,
+       /* 131 */ KEY_B,
+       /* 132 */ KEY_NOTUSED,
+       /* 133 */ KEY_6,
+       /* 134 */ KEY_Y,
+       /* 135 */ KEY_H,
+       /* 136 */ KEY_N,
+       /* 137 */ KEY_NOTUSED,
+       /* 138 */ KEY_7,
+       /* 139 */ KEY_U,
+       /* 140 */ KEY_J,
+       /* 141 */ KEY_M,
+       /* 142 */ KEY_NOTUSED,
+       /* 143 */ KEY_8,
+       /* 144 */ KEY_I,
+       /* 145 */ KEY_K,
+       /* 146 */ KEY_Comma,
+       /* 147 */ KEY_NOTUSED,
+       /* 148 */ KEY_9,
+       /* 149 */ KEY_O,
+       /* 150 */ KEY_L,
+       /* 151 */ KEY_Period,
+       /* 152 */ KEY_NOTUSED,
+       /* 153 */ KEY_0,
+       /* 154 */ KEY_P,
+       /* 155 */ KEY_NOTUSED,
+       /* 156 */ KEY_SemiColon,
+       /* 157 */ KEY_Slash,
+       /* 158 */ KEY_NOTUSED,
+       /* 159 */ KEY_Equal,
+       /* 160 */ KEY_RBrace,
+       /* 161 */ KEY_BSlash,
+       /* 162 */ KEY_NOTUSED,
+       /* 163 */ KEY_Minus,
+       /* 164 */ KEY_LBrace,
+       /* 165 */ KEY_Quote,
+       /* 166 */ KEY_NOTUSED,
+       /* 167 */ KEY_NOTUSED,
+       /* 168 */ KEY_NOTUSED,
+       /* 169 */ KEY_NOTUSED,
+       /* 170 */ KEY_NOTUSED,
+       /* 171 */ KEY_NOTUSED,
+       /* 172 */ KEY_NOTUSED,
+       /* 173 */ KEY_NOTUSED,
+       /* 174 */ KEY_NOTUSED,
+       /* 175 */ KEY_NOTUSED,
+       /* 176 */ KEY_NOTUSED,
+       /* 177 */ KEY_NOTUSED,
+       /* 178 */ KEY_NOTUSED,
+       /* 179 */ KEY_NOTUSED,
+       /* 180 */ KEY_NOTUSED,
+       /* 181 */ KEY_NOTUSED,
+       /* 182 */ KEY_NOTUSED,
+       /* 183 */ KEY_NOTUSED,
+       /* 184 */ KEY_NOTUSED,
+       /* 185 */ KEY_NOTUSED,
+       /* 186 */ KEY_NOTUSED,
+       /* 187 */ KEY_NOTUSED,
+       /* 188 */ KEY_NOTUSED,
+       /* 189 */ KEY_NOTUSED,
+       /* 190 */ KEY_NOTUSED,
+       /* 191 */ KEY_NOTUSED,
+       /* 192 */ KEY_NOTUSED,
+       /* 193 */ KEY_NOTUSED,
+       /* 194 */ KEY_NOTUSED,
+       /* 195 */ KEY_NOTUSED,
+       /* 196 */ KEY_NOTUSED,
+       /* 197 */ KEY_NOTUSED,
+       /* 198 */ KEY_NOTUSED,
+       /* 199 */ KEY_NOTUSED,
+       /* 200 */ KEY_NOTUSED,
+       /* 201 */ KEY_NOTUSED,
+       /* 202 */ KEY_NOTUSED,
+       /* 203 */ KEY_NOTUSED,
+       /* 204 */ KEY_NOTUSED,
+       /* 205 */ KEY_NOTUSED,
+       /* 206 */ KEY_NOTUSED,
+       /* 207 */ KEY_NOTUSED,
+       /* 208 */ KEY_NOTUSED,
+       /* 209 */ KEY_NOTUSED,
+       /* 210 */ KEY_NOTUSED,
+       /* 211 */ KEY_NOTUSED,
+       /* 212 */ KEY_NOTUSED,
+       /* 213 */ KEY_NOTUSED,
+       /* 214 */ KEY_NOTUSED,
+       /* 215 */ KEY_NOTUSED,
+       /* 216 */ KEY_NOTUSED,
+       /* 217 */ KEY_NOTUSED,
+       /* 218 */ KEY_NOTUSED,
+       /* 219 */ KEY_NOTUSED,
+       /* 220 */ KEY_NOTUSED,
+       /* 221 */ KEY_NOTUSED,
+       /* 222 */ KEY_NOTUSED,
+       /* 223 */ KEY_NOTUSED,
+       /* 224 */ KEY_NOTUSED,
+       /* 225 */ KEY_NOTUSED,
+       /* 226 */ KEY_NOTUSED,
+       /* 227 */ KEY_NOTUSED,
+       /* 228 */ KEY_NOTUSED,
+       /* 229 */ KEY_NOTUSED,
+       /* 230 */ KEY_NOTUSED,
+       /* 231 */ KEY_NOTUSED,
+       /* 232 */ KEY_NOTUSED,
+       /* 233 */ KEY_NOTUSED,
+       /* 234 */ KEY_NOTUSED,
+       /* 235 */ KEY_NOTUSED,
+       /* 236 */ KEY_NOTUSED,
+       /* 237 */ KEY_NOTUSED,
+       /* 238 */ KEY_NOTUSED,
+       /* 239 */ KEY_NOTUSED,
+       /* 240 */ KEY_NOTUSED,
+       /* 241 */ KEY_NOTUSED,
+       /* 242 */ KEY_NOTUSED,
+       /* 243 */ KEY_NOTUSED,
+       /* 244 */ KEY_NOTUSED,
+       /* 245 */ KEY_NOTUSED,
+       /* 246 */ KEY_NOTUSED,
+       /* 247 */ KEY_NOTUSED,
+       /* 248 */ KEY_NOTUSED,
+       /* 249 */ KEY_NOTUSED,
+       /* 250 */ KEY_NOTUSED,
+       /* 251 */ KEY_NOTUSED,
+};
+#define WS_LK201_MAP_SIZE (sizeof(wsLk201Map)/sizeof(*wsLk201Map))
+
+static
+TransMapRec wsLk201 = {
+    0,
+    WS_LK201_MAP_SIZE,
+    wsLk201Map
+};
+
 static CARD8 wsSunMap[] = {
        /* 0x00 */ KEY_Help,
        /* 0x01 */ KEY_L1,              /* stop */
@@ -636,7 +1138,7 @@
        /* 0x2d */ KEY_Mute,            /* Audio Mute */
        /* 0x2e */ KEY_KP_Divide,
        /* 0x2f */ KEY_KP_Multiply,
-       /* 0x30 */ KEY_NOTUSED,
+       /* 0x30 */ KEY_Power,
        /* 0x31 */ KEY_L5,              /* front */
        /* 0x32 */ KEY_KP_Decimal,
        /* 0x33 */ KEY_L6,              /* copy */
@@ -706,7 +1208,7 @@
        /* 0x73 */ KEY_NOTUSED,
        /* 0x74 */ KEY_NOTUSED,
        /* 0x75 */ KEY_NOTUSED,
-       /* 0x76 */ KEY_NOTUSED,         /* help */
+       /* 0x76 */ KEY_Help,            /* help */
        /* 0x77 */ KEY_CapsLock,
        /* 0x78 */ KEY_LMeta,
        /* 0x79 */ KEY_Space,
@@ -717,7 +1219,7 @@
        /* 0x7e */ KEY_NOTUSED,
        /* 0x7f */ KEY_NOTUSED
 };
-#define WS_SUN_MAP_SIZE (sizeof(wsSunMap)/sizeof(unsigned char))
+#define WS_SUN_MAP_SIZE (sizeof(wsSunMap)/sizeof(*wsSunMap))
 
 static
 TransMapRec wsSun = {
@@ -855,9 +1357,12 @@
            switch (pKbd->wsKbdType) {
               case WSKBD_TYPE_PC_XT:
               case WSKBD_TYPE_PC_AT:
-                    pKbd->RemapScanCode = ATScancode;
+                    pKbd->scancodeMap = &wsXt;
                     break;
               case WSKBD_TYPE_USB:
+#ifdef WSKBD_TYPE_MAPLE
+              case WSKBD_TYPE_MAPLE:
+#endif
                     pKbd->scancodeMap = &wsUsb;
                     break;
 #ifdef WSKBD_TYPE_ADB  
@@ -865,6 +1370,11 @@
                     pKbd->scancodeMap = &wsAdb; 
                     break;
 #endif
+#ifdef WSKBD_TYPE_LK201
+              case WSKBD_TYPE_LK201:
+                    pKbd->scancodeMap = &wsLk201;
+                    break;
+#endif
 #ifdef WSKBD_TYPE_SUN
 #ifdef WSKBD_TYPE_SUN5
               case WSKBD_TYPE_SUN5:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-input-keyboard-1.7.0/src/bsd_kbd.c 
new/xf86-input-keyboard-1.8.0/src/bsd_kbd.c
--- old/xf86-input-keyboard-1.7.0/src/bsd_kbd.c 2011-02-16 23:30:12.000000000 
+0100
+++ new/xf86-input-keyboard-1.8.0/src/bsd_kbd.c 2013-10-28 01:44:23.000000000 
+0100
@@ -39,6 +39,21 @@
    struct termios kbdtty;
 } BsdKbdPrivRec, *BsdKbdPrivPtr;
 
+#ifdef WSCONS_SUPPORT
+static Bool
+WSSetVersion(int fd, const char *name)
+{
+#ifdef WSKBDIO_SETVERSION
+    int version = WSKBDIO_EVENT_VERSION;
+    if (ioctl(fd, WSKBDIO_SETVERSION, &version) == -1) {
+        xf86Msg(X_WARNING, "%s: cannot set version\n", name);
+        return FALSE;
+    }
+#endif
+    return TRUE;
+}
+#endif
+
 static
 int KbdInit(InputInfoPtr pInfo, int what)
 {
@@ -54,7 +69,7 @@
 #if defined WSCONS_SUPPORT
             case WSCONS:
 #endif
-                tcgetattr(pInfo->fd, &(priv->kbdtty));
+               tcgetattr(pInfo->fd, &(priv->kbdtty));
 #endif
                 break;
         }
@@ -173,8 +188,8 @@
                         xf86Msg(X_ERROR, "KbdOn: tcsetattr: %s\n",
                             strerror(errno));
                 }
-                 break; 
-#endif 
+                 break;
+#endif
         }
 #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) || defined 
(WSCONS_SUPPORT)
         switch (pKbd->consType) {
@@ -189,7 +204,6 @@
                 ioctl(pInfo->fd, KDSKBMODE, K_RAW);
 #endif
                 break;
-#endif
 #ifdef WSCONS_SUPPORT
             case WSCONS:
                  option = WSKBD_RAW;
@@ -204,6 +218,24 @@
                 break;
 #endif
         }
+#endif
+    } else {
+        switch (pKbd->consType) {
+#ifdef WSCONS_SUPPORT
+            case WSCONS:
+               if ((pKbd->wsKbdDev[0] != 0) && (pInfo->fd == -1)) {
+                       xf86Msg(X_INFO, "opening %s\n", pKbd->wsKbdDev);
+                       pInfo->fd = open(pKbd->wsKbdDev, O_RDONLY | O_NONBLOCK 
| O_EXCL);
+                       if (pInfo->fd == -1) {
+                               xf86Msg(X_ERROR, "cannot open \"%s\"\n", 
pKbd->wsKbdDev);
+                               return FALSE;
+                       }
+                       if (WSSetVersion(pInfo->fd, pInfo->name) == FALSE)
+                               return FALSE;
+               }
+               break;
+#endif
+       }
     }
     return Success;
 }
@@ -238,6 +270,19 @@
                 break;
 #endif
         }
+    } else {
+         switch (pKbd->consType) {
+#ifdef WSCONS_SUPPORT
+            case WSCONS:
+                 if ((pKbd->wsKbdDev[0] != 0) && (pInfo->fd != -1)) {
+                       xf86Msg(X_INFO, "closing %s\n", pKbd->wsKbdDev);
+                       /* need to close the fd while we're gone */
+                       close(pInfo->fd);
+                       pInfo->fd = -1;
+                 }
+                break;
+#endif
+        }
     }
     return Success;
 }
@@ -251,7 +296,7 @@
 #endif
 
     if (loudness && pitch) {
-       switch (pKbd->consType) {
+       switch (pKbd->consType) {
 #ifdef PCCONS_SUPPORT
            case PCCONS:
                 { int data[2];
@@ -321,9 +366,9 @@
 }
 
 static void
-printWsType(char *type, char *devname)
+printWsType(const char *type, const char *name)
 {
-    xf86Msg(X_PROBED, "%s: Keyboard type: %s\n", devname, type); 
+    xf86Msg(X_PROBED, "%s: Keyboard type: %s\n", name, type);
 }
 #endif
 
@@ -344,7 +389,7 @@
     }
 
     switch (prot) {
-       case PROT_STD:
+       case PROT_STD:
            pInfo->read_input = stdReadInput;
            break;
 #ifdef WSCONS_SUPPORT
@@ -359,25 +404,25 @@
     }
     free(s);
 
-    s = xf86SetStrOption(pInfo->options, "Device", NULL);
+    if (prot == PROT_WSCONS)
+       s = xf86SetStrOption(pInfo->options, "Device", "/dev/wskbd");
+    else
+       s = xf86SetStrOption(pInfo->options, "Device", NULL);
+
     if (s == NULL) {
-       if (prot == PROT_WSCONS) {
-           xf86Msg(X_ERROR,"A \"device\" option is required with"
-                                  " the \"wskbd\" keyboard protocol\n");
-           return FALSE;
-       } else {
-           pInfo->fd = xf86Info.consoleFd;
-           pKbd->isConsole = TRUE;
-           pKbd->consType = xf86Info.consType;
-       }
+       pInfo->fd = xf86Info.consoleFd;
+       pKbd->isConsole = TRUE;
+       pKbd->consType = xf86Info.consType;
+       pKbd->wsKbdDev[0] = 0;
     } else {
        pInfo->fd = open(s, O_RDONLY | O_NONBLOCK | O_EXCL);
-       if (pInfo->fd == -1) {
+       if (pInfo->fd == -1) {
            xf86Msg(X_ERROR, "%s: cannot open \"%s\"\n", pInfo->name, s);
            free(s);
            return FALSE;
        }
        pKbd->isConsole = FALSE;
+       strncpy(pKbd->wsKbdDev, s, 256);
        pKbd->consType = xf86Info.consType;
        free(s);
     }
@@ -385,6 +430,8 @@
 #ifdef WSCONS_SUPPORT
     if( prot == PROT_WSCONS) {
        pKbd->consType = WSCONS;
+       if (WSSetVersion(pInfo->fd, pInfo->name) == FALSE)
+          return FALSE;
        /* Find out keyboard type */
        if (ioctl(pInfo->fd, WSKBDIO_GTYPE, &(pKbd->wsKbdType)) == -1) {
            xf86Msg(X_ERROR, "%s: cannot get keyboard type", pInfo->name);
@@ -398,6 +445,12 @@
            case WSKBD_TYPE_PC_AT:
                printWsType("AT", pInfo->name);
                break;
+           case 0:
+               /* If wsKbdType==0, no keyboard attached to the mux. Assume 
USB. */
+               xf86Msg(X_WARNING, "%s: No keyboard attached, assuming USB\n",
+                                  pInfo->name);
+               pKbd->wsKbdType = WSKBD_TYPE_USB;
+               /* FALLTHROUGH */
            case WSKBD_TYPE_USB:
                printWsType("USB", pInfo->name);
                break;
@@ -406,6 +459,16 @@
                printWsType("ADB", pInfo->name);
                break;
 #endif
+#ifdef WSKBD_TYPE_LK201
+           case WSKBD_TYPE_LK201:
+               printWsType("LK201", pInfo->name);
+               break;
+#endif
+#ifdef WSKBD_TYPE_MAPLE
+           case WSKBD_TYPE_MAPLE:
+               printWsType("Maple", pInfo->name);
+               break;
+#endif
 #ifdef WSKBD_TYPE_SUN
            case WSKBD_TYPE_SUN:
                printWsType("Sun", pInfo->name);
@@ -417,10 +480,10 @@
                break;
 #endif
            default:
-               xf86Msg(X_ERROR, "%s: Unsupported wskbd type \"%d\"",
-                                pInfo->name, pKbd->wsKbdType);
-               close(pInfo->fd);
-               return FALSE;
+               xf86Msg(X_WARNING, "%s: Unsupported wskbd type \"%d\"\n",
+                                  pInfo->name, pKbd->wsKbdType);
+               printWsType("Unknown wskbd", pInfo->name);
+               break;
        }
     }
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-input-keyboard-1.7.0/src/kbd.c new/xf86-input-keyboard-1.8.0/src/kbd.c
--- old/xf86-input-keyboard-1.7.0/src/kbd.c     2013-03-27 01:56:38.000000000 
+0100
+++ new/xf86-input-keyboard-1.8.0/src/kbd.c     2013-10-28 01:44:15.000000000 
+0100
@@ -85,7 +85,15 @@
 };
 
 static const char *kbdDefaults[] = {
+#ifdef __NetBSD__
+#ifdef DEFAULT_TO_WSKBD
+    "Protocol",                "wskbd",
+#else
     "Protocol",                "standard",
+#endif
+#else /* NetBSD */
+    "Protocol",                "standard",
+#endif /* NetBSD */
     "XkbRules",                "base",
     "XkbModel",                "pc105",
     "XkbLayout",       "us",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-input-keyboard-1.7.0/src/xf86OSKbd.h 
new/xf86-input-keyboard-1.8.0/src/xf86OSKbd.h
--- old/xf86-input-keyboard-1.7.0/src/xf86OSKbd.h       2013-03-27 
01:56:38.000000000 +0100
+++ new/xf86-input-keyboard-1.8.0/src/xf86OSKbd.h       2013-10-28 
01:44:15.000000000 +0100
@@ -82,6 +82,7 @@
     pointer            private;
     int                        consType;
     int                        wsKbdType;
+    char               wsKbdDev[256];
 
 } KbdDevRec, *KbdDevPtr;
 

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to