But should we use X11 as the standard library then, even on Windows or Mac?

It surely is better than nothing, but it feels a bit weird to install X11 just for using the key codes.

Maybe splitting these keys into a separate package would be a good idea?


On Wed, Aug 26, 2009 at 12:42 PM, Yitzchak Gale <gale@sefer.org> wrote:
Peter Verswyvelen wrote:
> Several libraries define their own codes for they keyboard (GLFW, GTK, GLUT,
> etc)
> Maybe it would be nice to agree on a standard datatype for keys? This might
> also include digital buttons on a joystick, etc...
> The Windows API has virtual key codes for this.

X windows key symbols are used extensively in XMonad.
They are found in the X11 package, in the modules
Graphics.X11.Types and Graphics.X11.ExtraTypes.

-Yitz