This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] [PATCH] Paravirt framebuffer backend tools [2/5]

To: Anthony Liguori <aliguori@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Paravirt framebuffer backend tools [2/5]
From: Steven Smith <sos22-xen@xxxxxxxxxxxxx>
Date: Wed, 6 Sep 2006 10:14:12 +0100
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Jeremy Katz <katzj@xxxxxxxxxx>, aliguori <aliguori@xxxxxxxxxxxxxxx>, Markus Armbruster <armbru@xxxxxxxxxx>, sos22@xxxxxxxxxxxxx
Delivery-date: Wed, 06 Sep 2006 02:15:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <44FDAC68.8050205@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20060904090150.GC4812@xxxxxxxxx> <1157472715.7571.88.camel@xxxxxxxxxxxxxx> <44FDAC68.8050205@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
> >>>--- /dev/null      Thu Jan 01 00:00:00 1970 +0000
> >>>+++ b/tools/xenfb/keymapping.c     Sat Sep 02 15:19:25 2006 -0400
> >>>@@ -0,0 +1,141 @@
> >>>+#include <stdint.h>
> >>>+#include <gdk/gdkkeysyms.h>
> >>>+#include <linux/input.h>
> >>>+
> >>>+uint32_t gdk_linux_mapping[0x10000] = {
> >>>+  [GDK_a] = KEY_A,
> >>>      
> >>This is kind of ugly.  Is there any chance it could be autogenerated?
> >>Also, where did 0x10000 come from?
> >>
> >>Also, depending on GTK just for the keymap table is a real pain.  Or
> >>is it already required for libvncserver?
> >>    
> >
> >libvncserver requires GTK.  And I don't know that there's really any
> >good way to auto-generate it unfortunately.  I somehow expect that
> >0x10000 came from "it'll be big enough" but Anthony would have to
> >confirm :-)
> That's the biggest that a GDK scan code can currently be.
Do you have a reference for that? Could the table grow in the future?

(who just spent a whole day tracking down a bug which turned out to be
an undersized lookup table combined with a lack of bounds checking)

> That way, we can use a simple indexed table.
> Regards,
> Anthony Liguori
> >The mappings are unfortunately a bit of a fact of life since we have to
> >convert from what the X layer gets to what the kernel expects.  And the
> >two couldn't be farther from the same.  And then it's even more fun when
> >toolkits get involved.
> >  

Attachment: signature.asc
Description: Digital signature

Xen-devel mailing list