As noted in the previous section, the user can do a number of navigation operations with the keyboard when menu hot-tracking is disabled. Toolbar controls support keyboard navigation only if they have focus. They also do not handle all the key presses that are needed for menu bars. The simplest solution to handling keyboard navigation is to process the relevant key press events explicitly.
If menu hot-tracking is disabled, your application must handle these key press events in the following way:
The F10 key. Activate the first button with TB_SETHOTITEM.
The LEFT ARROW and RIGHT ARROW keys. Activate the adjacent button with TB_SETHOTITEM. If the user attempts to navigate off either end of the menu bar, activate the first button at the opposite end.
The ESCAPE key. Deactivate the active button with TB_SETHOTITEM. The menu bar should be returned to the state it had prior to activating the first button.
An ALT-Key accelerator key. Use the TB_MAPACCELERATOR message to determine which button the Key character corresponds to. Display the button's drop-down menu and enable menu hot-tracking.
The DOWN ARROW key. If a button is active but no menu has been displayed, display the button's menu and enable menu hot-tracking.
The ENTER key. Deactivate the active button with TB_SETHOTITEM. The menu bar should be returned to the state it had prior to activating the first button.