Menu Access

The OS/2 operating system is designed to work with or without a mouse or other pointing device. The system provides default behavior that enables a user to interact with menus without a mouse. Following are the keystrokes that produce this default behavior:

┌────────────────────┬────────────────────────────────────────┐
│Keystroke           │Action                                  │
├────────────────────┼────────────────────────────────────────┤
│Alt                 │Toggles in and out of menu-bar mode.    │
├────────────────────┼────────────────────────────────────────┤
│Alt+Spacebar        │Shows the system menu.                  │
├────────────────────┼────────────────────────────────────────┤
│F10                 │Backs up one level. If a submenu is     │
│                    │displayed, it is canceled. If no submenu│
│                    │is displayed, this keystroke exits the  │
│                    │menu.                                   │
├────────────────────┼────────────────────────────────────────┤
│Shift+Esc           │Shows the system menu.                  │
├────────────────────┼────────────────────────────────────────┤
│Right Arrow         │Cycles to the next top-level menu item. │
│                    │If the selected item is at the far-left │
│                    │side of the menu, the menu code sends a │
│                    │WM_NEXTMENU message to the frame window.│
│                    │The default processing by the frame     │
│                    │window is to cycle between the          │
│                    │application and system menus. (An       │
│                    │application can modify this behavior by │
│                    │subclassing the frame window.) If the   │
│                    │selected item is in a submenu, the next │
│                    │column in the submenu is selected, or   │
│                    │the next top-level menu item is         │
│                    │selected; this keystroke also can send  │
│                    │or process a WM_NEXTMENU message.       │
├────────────────────┼────────────────────────────────────────┤
│Left Arrow          │Works like the Right Arrow key, except  │
│                    │in the opposite direction. In submenus, │
│                    │this keystroke backs up one column,     │
│                    │except when the currently selected item │
│                    │is in the far-left column, in which case│
│                    │the previous submenu is selected.       │
├────────────────────┼────────────────────────────────────────┤
│Up Arrow or Down    │When pressed in a top-level menu,       │
│Arrow               │activates a submenu. When pressed in a  │
│                    │submenu, this keystroke selects the     │
│                    │previous or next or item, respectively. │
├────────────────────┼────────────────────────────────────────┤
│Enter               │Activates a submenu, and highlights the │
│                    │first item if an item has a submenu     │
│                    │associated with it; otherwise, this     │
│                    │keystroke chooses the item as though the│
│                    │user released the mouse button while the│
│                    │item was selected.                      │
├────────────────────┼────────────────────────────────────────┤
│Alphabetic character│Selects the first menu item with the    │
│                    │specified character as its mnemonic key.│
│                    │A mnemonic is defined for a menu item by│
│                    │placing a tilde (~) before the character│
│                    │in the menu text.  If the selected item │
│                    │has a submenu associated with it, the   │
│                    │menu is displayed, and the first item is│
│                    │highlighted; otherwise, the item is     │
│                    │chosen.                                 │
└────────────────────┴────────────────────────────────────────┘

An application does not support the default keyboard behavior with any unusual code; instead, the application receives a message when a menu item is chosen by the keyboard just as though it had been chosen by a mouse.


[Back: Menu-Item Structure]
[Next: Mnemonics]