Action generated when a keyboard event occurs.
int function(Ihandle *self, int c); [in C] elem:k_any() -> (ret: number) [in IupLua]
self: identifier of the element where the user typed something.
c: identifier of typed key. Please refer to the Keyboard Codes table for a list of possible values.
If the function returns IUP_IGNORE, the system will ignore the typed character. If the function returns the code of any other key, IUP will treat this new key instead of the one typed by the user.
If the function returns IUP_CONTINUE, the event will be propagated to the parent of the element receiving it.
All defined keys are also callbacks of any element, called when the respective key is activated. For exemple: "K_cC" is also a callback activated when the user press Ctrl+C. A shortcut key or hot key can also be associated to any existing callback, either in a menu or any other element, using this same mechanism. These callbacks do not work in IupLua.
The K_ANY callback is a callback that depends on the keyboard focus and the keyboard usage of the control with the focus. It is usually only set for dialogs, but if a control set the K_ANY callback the dialog callback will only be called if the control callback returns IUP_CONTINUE.
Also some keys may not activate the callback since they are reserved keys, like Enter and Esc.