[Contents] [index] [Help] [Retrace] [browse <] [Browse >]

maprawkey() is converts raw key codes to ansi characters based on a
default or supplied keymap.

    WORD MapRawKey(struct InputEvent *inputevent, UBYTE *buffer,
                   WORD bufferlength, struct Keymap *keymap);

maprawkey() takes an ieclass_rawkey inputevent, which may be chained, and
converts the key codes to ANSI characters which are placed in the
specified buffer. If the buffer would overflow, for example because a
longer string is attached to a key, -1 will be returned. If no error
occurred, MapRawKey() will return the number of bytes written in the
buffer.  The keymap argument can be set to NULL if the default keymap is
to be used for translation, or can be a pointer to a specific keymap
structure.

The following example shows how to implement the maprawkey() function.

     maprawkey.c