K_ANY
Action generated when a keyboard event occurs.
Callback
int function(Ihandle *ih, int c); [in C] elem:k_any() -> (ret: number) [in Lua]
ih:
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 returns IUP_CONTINUE, the event will be propagated to the parent of the element receiving it. Dialog K_* callbacks depend on this return value on child control callbacks.
If returns IUP_DEFAULT the key is processed but it is not propagated.
Notes
Keyboard callbacks depend on the keyboard usage of the control with the focus.
If the callback does not exists it is automatically propagated to the parent of the element.
K_* callbacks
All defined keys are also callbacks of any element, called when the respective key is activated. For example: "K_cC" is also a callback activated when the user press Ctrl+C, when the focus is at the element. This is the way an application can create shortcut keys, also called hot keys. These callbacks are not available in IupLua.
Affects
All elements with user interaction.