home *** CD-ROM | disk | FTP | other *** search
- cookRawkey.m - Module of functions designed to process a raw input event,
- translating it into its corresponding Vanilla keycode as defined by the
- current keymap. Uses the console.device.
-
- warmupRawkeyCooker()
-
- Initializes the module to enable processing of raw input events. Should be
- called once prior to invoking any of the other functions in the module.
- May raise any of the following exceptions: "MEM", ER_CREATEPORT,
- ER_CREATEIO, ER_OPENDEVICE, ER_ASKKEYMAP.
-
- ascii_keycode:=cookRawkey(message.code, message.qualifier, message.iaddress)
-
- ascii_keycode gets the Vanilla ASCII value if one exists, else 0. message is
- here a PTR TO intuimessage, which contains the address of an IDCMP_RAWKEY
- message. Vanilla ASCII codes may be manufactured by passing in a valid raw
- code and a valid raw qualifier, and a valid PTR TO LONG which points to
- deadkey prefixes (or zeroized memory if deadkeys aren't desired, i.e.,
- [0]:LONG) for the iaddress.
-
- shutdownRawkeyCooker()
-
- Cleans up the module. Should be called once when the module's functions are
- no longer needed. Raises no exceptions. Performs complete sanity checks,
- and may therefore be safely called multiple times.
-
-
- NOTES:
-
- It is entirely possible that this module will successfully translate any
- kind of raw input event properly, although this has not been tested. :-)
-
- You may repeatedly warmup and shutdown the rawkey cooker module, but you must
- be careful to call shutdownRawkeyCooker() before calling warmupRawkeyCooker()
- a subsequent time. Otherwise, the allocated resources will be irreclaimable
- and your system will degrade.
-