Keyboard
Keyboard navigation is the dialog uses the "Tab" key to change the keyboard focus from one control to another. All IUP interactive controls have Tab stops, but the navigation order is related to the order the controls are placed in the dialog and can not be changed. When the focus is at a Multiline control to change focus the combination "Ctrl+Tab" must be used, because "Tab" is a valid character for the Multiline. The application can also control the focus using the functions:
IupGetFocus,IupSetFocus,IupNextFieldandIupPreviousField. And when the focus is changed the application is notified trough the callbacksGETFOCUS_CBandKILLFOCUS_CB.Two keys are also important in keyboard navigation: "Enter" and "Esc". But they are only active is the application register the attributes
DEFAULTENTERandDEFAULTESCof theIupDialog. These attributes configure buttons to be activated when the respective key is pressed. Again "Enter" is a valid key for the Multiline so the combination "Ctrl+Enter" must be used instead. If the focus is at a button then the Enter key will activate this button independent from theDEFAULTENTERattribute.Usualy the application will process keyboard input in the canvas using the
KEYPRESS_CBcallback. But there is also theK_ANYcallback that can be used for all the controls, but it does not have control of the press state. Both callbacks use the key codification explained in Keyboard Codes. These codes are also used in theACTIONcallbacks ofIupTextandIupMultiline, and in shortcuts for menu items and submenus using theKEYattribute ofIupItemandIupSubmenu. Finally all the keyboard codes can be used as callback names to implement application hot keys.