Key(k:Keymap, key:Str):Int

Look up key in keymap. The keymap is specified as the keymap name, the key is a string, as in

  Key(Global, "Alt-C")

If the key is bound in the keymap, returns its numeric command code. This usually is an atom that can be converted back into a command using AtomStr.

If the key is not bound in the keymap directly, its parent keymaps will be consulted. If the key cannot be found in those as well, the return value is EMPTY.

Version Differences: It is an error in PCC2 if the keymap does not exist. PCC 1.x just returns EMPTY in this case.

Since: PCC 1.1.10, PCC2 1.99.9

See also: Bind, Elementary Functions