Century Embedded Technologies Nano-X SDK and Developer's Guide | ||
---|---|---|
Prev | Chapter 9. Common Widgets and Attributes | Next |
Shortcuts are key sequences that activate widgets (usually buttons or menu items). The shortcut() method sets the shortcut for a widget:
button->shortcut(FL_Enter); button->shortcut(FL_SHIFT + 'b'); button->shortcut(FL_CTRL + 'b'); button->shortcut(FL_ALT + 'b'); button->shortcut(FL_CTRL + FL_ALT + 'b'); button->shortcut(0); // no shortcut
The shortcut value is the key event value (the ASCII value or one of the special keys like FL_Enter) combined with any modifiers (like shift, alt, and control).