Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Collapse]Scheduler
   [Expand]Product Information
   [Expand]Getting Started
   [Collapse]Fundamentals
    [Expand]Scheduler Elements
    [Expand]Scheduler Structure
    [Expand]Appointments
     Resources for Appointments
    [Expand]Views
    [Expand]Data Binding
    [Expand]Mappings
    [Expand]Supported Formats
    [Collapse]Services
      Introduction to Services in XtraScheduler
      Keyboard Services
      Mouse Services
      DateTime Navigation Services
      Resource Navigation Services
      Scheduler State Service
      Formatting Services
      Appointment Selection Service
      Selection Service
    [Expand]Time Zones
     Printing
    [Expand]Scheduler Reporting
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]Examples
   [Expand]End-User Capabilities
   [Expand]Member Tables
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Keyboard Services

The IKeyboardHandlerService in the XtraScheduler provides the capability to determine which key is pressed or released. It has the following delegates:

To handle these events you should first create a new class inherited form the KeyboardHandlerServiceWrapper, and override its methods as needed. The following code snippet illustrates how this can be done:

The provider is the SchedulerControl instance that provides the service.

This class will replace the existing service that handles the keyboard events.

The following code example replaces the existing keyboard handling service of the XtraScheduler with a custom one. Use this code in the Form Load event.

Key events occur in the following order:

  1. KeyDown
  2. KeyPress
  3. KeyUp

The KeyPress event is not raised by keys which do not represent characters; however, the noncharacter keys do raise the KeyDown and KeyUp events.

To handle keyboard events only within a current form, and disable other controls from receiving keyboard events, set the e.Handled property in event-handling method to true.

How would you rate this topic?​​​​​​​