Re: keycode



Philip Kendall <pak ast cam ac uk> writes: 
guint keycode = XKeysymToKeycode( gdk_display, keysym );


Keep in mind that multiple keycodes can generate a single keysym, so
this isn't really reliable. See gdk/x11/gdkkeys-x11.c in the GTK 2
devel tree for the full-blown code.
 
Whether a program _should_ be interpreting keycodes, rather than passing
them to the X server to get keysyms is trickier -- AFAIK, keycodes are
just magic numbers with have a meaning only to the X server, and will
differ significantly between machines/architectures, etc...

Indeed.

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]