Maps an input state to the name of an event handler.
Maps an input state sequence to a function name using a string-encoded sequence in keyname. The format of keyname is a sequence of semicolon-delimited input states; each state is made up of a sequence of modifier identifiers followed by a key identifier.
The modifier identifiers are ``s:'' (for Shift), ``c:'' (for Control), ``a:'' (for Alt), ``m:'' (for Meta: Unix), and ``d:'' (for Command: MacOS). They can appear in any order within a key state.
A key identifier can be a character on the keyboard -- e.g., "a", "2", "?" -- or a special input name. The special names are:
For a special keyword, the capitalization does not matter. However, capitalization is important for single-letter keynames (e.g., "A" is interpreted as "s:a").
As an example, this string describes the keysequence escape-control-C: "esc;c:c".
See also implies-shift.
If an attempt is made to use a particular key sequence both as a prefix and as a complete sequence, an error is set to the handler installed with set-error-callback.
If the last input state in a sequence is a keyboard state, then fname should be the name of a keyboard event handler; if the last input state is a mouse state, fname should be the name of a mouse event handler. Event handlers are mapped to their names using add-key-function and add-mouse-function.
The function names do not have to be mapped to handlers before input states are mapped to the names; the handler is dispatched by name at the time of invocation. The event handler mapped to a name can be changed without affecting the map from input states to function names.