# KeyMonitorEventArgs class

Namespace: [Eto.Forms](https://eto.picoe.ca/api/namespace/eto.forms.md) · Assembly: [Eto](https://eto.picoe.ca/api/assembly/eto.md) · Since v2.12

```cs
public class KeyMonitorEventArgs : EventArgs
```

Arguments for key events observed by [Window.PreviewKeyDown](https://eto.picoe.ca/api/type/eto.forms.window/previewkeydown.md) and [Window.PreviewKeyUp](https://eto.picoe.ca/api/type/eto.forms.window/previewkeyup.md).

**Remarks:** Unlike [KeyEventArgs](https://eto.picoe.ca/api/type/eto.forms.keyeventargs.md) there is deliberately no way to mark the event as handled. Monitoring a window's keys observes them, it never consumes them, so the focused control always goes on to receive the key press. Use [Control.KeyDown](https://eto.picoe.ca/api/type/eto.forms.control/keydown.md) when you need to handle or suppress a key.

## Constructors

- [KeyMonitorEventArgs](https://eto.picoe.ca/api/type/eto.forms.keymonitoreventargs/ctor.md): Initializes a new instance of the [KeyMonitorEventArgs](https://eto.picoe.ca/api/type/eto.forms.keymonitoreventargs.md) class.

## Properties

- [Key](https://eto.picoe.ca/api/type/eto.forms.keymonitoreventargs/key.md): Gets the key value (without modifiers)
- [KeyData](https://eto.picoe.ca/api/type/eto.forms.keymonitoreventargs/keydata.md): Gets the raw key data (the combination of the [KeyMonitorEventArgs.Key](https://eto.picoe.ca/api/type/eto.forms.keymonitoreventargs/key.md) and [KeyMonitorEventArgs.Modifiers](https://eto.picoe.ca/api/type/eto.forms.keymonitoreventargs/modifiers.md))
- [KeyEventType](https://eto.picoe.ca/api/type/eto.forms.keymonitoreventargs/keyeventtype.md): Gets the type of the key event.
- [Modifiers](https://eto.picoe.ca/api/type/eto.forms.keymonitoreventargs/modifiers.md): Gets the modifier keys that were pressed for this event
