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.

Callback

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

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.