key_keycode/[3,4]
     key_keycode(+Displayable, ?Key, ?Keycode, ?Index)
     key_keycode(?Key, ?Keycode, ?Index)
     

Translates between keys and keycodes.

Under X11, physical keys are mapped to unique server-dependent keycodes and keycodes are mapped to a list of server-independent keysyms.

Displayable is a ProXL Displayable. If omitted, the default Display is used.

Key is a key name, as given by keysym/2.

Keycode is an integer, between 8 and 255, corresponding to the Key.

Index is an integer, typically 0 or 1, that identifies which of the keysyms attached to Keycode corresponds to Key. The usual case is that Keysym number 0 corresponds to the lower case variant of the key, and Keysym number 1 to the upper case variant, if it exists.