KeyCommandEventArgs Class

Describes the event data for key and command events. The application can register for the event by adding its event handler to the KeyCommandEvent event of an PlaybackSession object.

The event can represent a keystroke (the EventType property is true) or a command (EventType is false).

For a keystroke, the Key property contains an appropriate keycode, the State property indicates whether the key is currently pressed, and the InputModifiers property indicates whether an additional key (such as CTRL) was also pressed when the keystroke action occurred.

For a command, the Command property indicates the associated system command being processed (a key might translate to a command). The State property indicates whether a key is currently pressed.

  public sealed class KeyCommandEventArgs : EventArgs

Members

Public Instance Methods

Method Description
KeyCommandEventArgs Initializes a new instance of the KeyCommandEventArgs class.

Public Instance Properties

Property Description
Command Gets a value that indicates which command is being sent.
EventType Gets a value that indicates whether the event is a keystroke or command.
InputModifiers Gets a value that indicates whether any additional keys were pressed when a keystroke action occurred.
Key Gets a value that indicates which key the event is for.
State Gets a value that identifies whether a key is being pressed.

Requirements

Reference: Microsoft.MediaCenter.ITVVM

Namespace: Microsoft.MediaCenter.TVVM

Assembly: Microsoft.MediaCenter.ITVVM.dll

Platform: Windows 7

See Also