Maps an input state to the name of an event handler. The return value is an opaque object for the the internal representation of the input state that is used to define sequences.
The value of code can either be a standard key code (see wx:key-event%) or one of the following special values that indicate mouse states:
To specify an n-time button click, you can use the constant wx:const-k-click-adder. Each addition of wx:const-k-click-adder specifies one more click. For example, a left quadruple-click is specified by (+ wx:const-k-mouse-left (* 3 wx:const-k-click-adder)).
If prevkey is not null, then the input state is the continuation of a sequence. The value of type specifies whether the sequence continues further: wx:const-key-final indicates that this is the last input state in the sequence; wx:const-key-prefix indicates that there will be more input states in the sequence (which will be connected to this one using map-function's return value), and the value of fname is ignored.
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.
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.