IUP_K_ANY

IUP - Portable User Interface

KEYPRESS_CB

Action generated when a key is pressed or released. If the key is pressed and held several calls will occur. It is called after the common callback K_ANY.

Callback

int function(Ihandle *self, int c, int press); [in C]
elem:keypress_cb(c, press: number) -> (ret: number) [in Lua]

self: identifier of the element.
c: identifier of typed key. Please refer to the Keyboard Codes table for a list of possible values.
press: 1 is the user pressed the key or 0 otherwise.

This function may return IUP_CLOSE.

Affects

IupCanvas, IupGLCanvas