# &cbind(4)

[Home] [Commands] [Variables] [Macro-Dev] [Glossary]

## NAME

&cbind, &kbind, &nkind - Command/key binding operators

## SYNOPSIS

&cbind key
&kbind n command
&nbind key

## DESCRIPTION

&cbind returns the command bound to the given key sequence, &kbind can be abbreviated to &kbi. If the key is not bound then &kbind returns the string "ERROR".

&nbind returns the numerical argument associated with the given key binding, &nbind can be abbreviated to &nbi. If the key is not bound then &nbind returns the string "ERROR", if the binding has no argument then an empty string (`""`) is returned.

&kbind returns a key sequence bound to the given command with the given numerical argument n. If no binding can be found then &kbind returns an empty string (`""`).

## EXAMPLE

The following example waits for the user to press a key, then prints what command the key is bound to.

    ml-write "Enter key: "
    set-variable #l0 @cgk
    ml-write &spr "%s is bound to %s" #l0 &cbin #l0

## NOTES

In March 2001 &kbind was renamed &ckind and a new &nkind and &kbind added.

## SEE ALSO

Variable Functions, global-bind-key(2).

(c) Copyright JASSPA 2009
Last Modified: 2009/08/29
Generated On: 2009/10/12

</HMTL>