WinForms Shortcuts Overview
Almost each application uses the so-called “Shortcuts” – a keyboard combination that triggers a specific action. For a valid shortcut is considered any keyboard combination where a Modifier Key (Ctrl
, Alt
and Shift
or a combination of these) is down and other key(s) is pressed. This semantic is available out-of-the-box in our framework and allows you to seamlessly plug any valid keys combination as an action accelerator. Supported are also the so-called multiple keys shortcuts where the Keys member of each shortcut may be more than one key – e.g. Ctrl
+ A
, S
is recognized by the framework. Shortcuts without modifier keys are also supported, but they should be used with caution, since they may be in conflict with other controls which intercept keyboard input.
The Shortcut is part of Telerik UI for WinForms, a
professional grade UI library with 160+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.
How is it done?
The following diagram illustrates the object model and class hierarchy that lie behind each RadShortcut:
The entire mechanism is controlled by several interfaces and classes which provide very easy and intuitive way to register different shortcuts.
RadKeyboardFilter: This class listens to all keyboard messages that come on the application’s message queue and delegates them to each IKeyboardListener registered.
RadShortcutManager: A concrete implementation of IKeyboardListener interface which is plugged into the RadKeyboardFilter instance. It stores a collection of IShortcutProvider instances, recognizes a valid shortcut combination, provided by any of the registered IShortcutProvider and calls the IShortcutProvider.OnShortcut(RadShortcut) callback of the matched provider.
RadItem.Shortcuts: Each RadItem implements the IShortcutProvider interface and allows a number of shortcuts to be associated with it. When a keyboard combination matches any of the item’s shortcuts, the item’s Click event is raised.
Telerik UI for WinForms Learning Resources
- Get Started with the Telerik UI for WinForms Shortcut
- Telerik UI for WinForms API Reference
- Getting Started with Telerik UI for WinForms Components
- Telerik UI for WinForms Virtual Classroom (Training Courses for Registered Users)
- Telerik UI for WinForms Forum
- Telerik UI for WinForms Knowledge Base
Telerik UI for WinForms Additional Resources
- Telerik UI for WinForms Product Overview
- Telerik UI for WinForms Blog
- Telerik UI for WinForms Videos
- Telerik UI for WinForms Roadmap
- Telerik UI for WinForms Pricing
- Telerik UI for WinForms Code Library
- Telerik UI for WinForms Support
- What’s New in Telerik UI for WinForms