[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: X Keycodes
- To: <linuxgames@sunsite.dk>
- Subject: Re: X Keycodes
- From: "Randall Hopper" <listaddr@french.toast.net>
- Date: Sun, 6 Oct 2002 20:23:13 -0400
- Delivered-To: archiver@seul.org
- Delivered-To: mailing list linuxgames@sunsite.dk
- Delivery-Date: Sun, 06 Oct 2002 20:21:07 -0400
- Mailing-List: contact linuxgames-help@sunsite.dk; run by ezmlm
- Reply-To: linuxgames@sunsite.dk
> On Fri, Oct 04, 2002 at 09:14:22PM +0200, Josef Spillner wrote:
> > On Friday 04 October 2002 16:04, Nathi-huesken@gmx.de wrote:
> > > can't find anything like a "definition list" which keycode is
> > > related to which actual key.
>
> You can find key codes in (usually)
> /usr/X11R6/include/X11/keysymdef.h.
You may have already figured it out, but keycodes are hardware-specific -- you probably don't want to use them. Use keysyms. The advantage being you get hardware portability, and you also support users who want/need to remap their keys. Flip up the xmodmap man page for starters; check out "xmodmap -pk" and cat the "swap control and caps lock" example into "xmodmap -" to start getting a feel for what's going on.
Basically: "App" uses "keysym" which is mapped to "keycode" which represents a "key". Keycodes are just numbers. Keysyms are things like "1" "A" "F10" "CapsLock" etc.
Randy