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
,IupNextField
andIupPreviousField
. And when the focus is changed the application is notified trough the callbacksGETFOCUS_CB
andKILLFOCUS_CB
.Two keys are also important in keyboard navigation: "Enter" and "Esc". But they are only active is the application register the attributes
DEFAULTENTER
andDEFAULTESC
of 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 theDEFAULTENTER
attribute.Usualy the application will process keyboard input in the canvas using the
KEYPRESS_CB
callback. But there is also theK_ANY
callback 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 theACTION
callbacks ofIupText
andIupMultiline
, and in shortcuts for menu items and submenus using theKEY
attribute ofIupItem
andIupSubmenu
. Finally all the keyboard codes can be used as callback names to implement application hot keys.