From: "Stephen C. Tweedie" Subject: Re: [PATCH] Paravirt framebuffer backend tools [2/5] Date: Tue, 10 Oct 2006 17:53:47 +0100 Message-ID: <1160499227.5951.35.camel@sisko.scot.redhat.com> References: <20060904090150.GC4812@cam.ac.uk> <44FC224D.3090300@bull.net> <20060906091505.GD3257@cam.ac.uk> <44FEB3DE.5070502@bull.net> <20060906171006.GA5306@cam.ac.uk> <44FFCAC0.6060809@bull.net> <20060907083848.GA3078@cam.ac.uk> <45016F8E.1030300@cs.utexas.edu> <20060908141248.GA6845@cam.ac.uk> <45017CCF.9050707@cs.utexas.edu> <87psd4ul5c.fsf@pike.pond.sub.org> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <87psd4ul5c.fsf@pike.pond.sub.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Markus Armbruster Cc: "xen-devel@lists.xensource.com" , Jeremy Katz , Laurent Vivier , sos22@srcf.ucam.org, Anthony Liguori List-Id: xen-devel@lists.xenproject.org Hi, On Sat, 2006-10-07 at 18:48 +0200, Markus Armbruster wrote: > The backend gets keys in an encoding that depends on the software used > to access the keyboard: > > * with SDL, struct SDL_keysym (consists of scancode, SDL keysym, > current modifiers and optionally Unicode translation), > > * with LibVNCServer: rfbKeySym (which is just an X11 keysym). > > The frontend needs to stuff Linux keycodes into the input layer. > > Our job is to translate from frontend keysyms to Linux keycodes, and > the question is to find out how and where. Bear in mind that it may simply not be possible. :-( An example is my UK keyboard connecting to a guest with a US keymap. For me, "#" is a key on its own (with "~" as the shift-modified key.) When I type "#", with no modifier pressed, there is simply no way to translate that to a single keycode on a US keymap and get the "#" ksym out --- on a US keyboard, "#" requires shift to be held down. The only way you'll get such a keypress through is by faking modifiers on the fly. --Stephen