[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg
Subject:    Re: Sic transit gloria keycodi
From:       Peter Hutterer <peter.hutterer () who-t ! net>
Date:       2010-08-26 22:34:59
Message-ID: 20100826223459.GA27984 () barra ! bne ! redhat ! com
[Download RAW message or body]

On Thu, Aug 26, 2010 at 07:44:22PM +0200, Andre Majorel wrote:
> On 2010-08-25 08:31 +1000, Peter Hutterer wrote:
> > On Tue, Aug 24, 2010 at 08:38:33PM +0200, Andre Majorel wrote:
> > > It was apparently decided that evdev should have different
> > > keycodes than the usual. I for one welcome our new keycodes, the
> > > old ones weren't any good anyway.
> > > 
> > > Now I need a way to query the X server for which keycodes mean
> > > what, or at least whether it's the traditional set or the evdev
> > > set.
> > > 
> > > Is XGetKeyboardMapping() the way to do that ? Its removal is not
> > > in the plans, is it ?
> > 
> > In X, a keycode has no meaning other than being an index into
> > the keysym table. Which keycodes are used doesn't matter,
> > XGetKeyboardMapping() is the core protocol approach to
> > obtaining the keysyms (which are what really matters),
> 
> A keycode tells you which key it is. 

.. given a specific driver on a specific platform and a specific version of
anything involved. You're not guaranteed that a keycode remains the same,
even between server instances.

"A KEYCODE represents a physical (or logical) key. Keycodes lie in the
inclusive range [8,255]. A keycode value carries no intrinsic information,
although server implementors may attempt to encode geometry information (for
example, matrix) to be interpreted in a server-dependent fashion."
- X Protocol Specification, Page 6. 

Cheers,
  Peter
_______________________________________________
xorg@lists.freedesktop.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.freedesktop.org/mailman/listinfo/xorg
Your subscription address: freedesktop-xorg@progressive-comp.com
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic