# RawKeyEventArgs

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/input/raw/struct-rawkeyeventargs/

**struct** · [`ferroui-base`](/docs/0.5.0/api/ferroui-base/) · v0.5.0

```rust
struct RawKeyEventArgs
```

A raw keyboard event.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/raw/raw_key_event_args.rs#L15)

## Members

- [`new`](#function-new)
- [`key`](#function-key)
- [`set_key`](#function-set_key)
- [`modifiers`](#function-modifiers)
- [`set_modifiers`](#function-set_modifiers)
- [`type_`](#function-type_)
- [`set_type`](#function-set_type)
- [`physical_key`](#function-physical_key)
- [`set_physical_key`](#function-set_physical_key)
- [`key_device_type`](#function-key_device_type)
- [`set_key_device_type`](#function-set_key_device_type)
- [`key_symbol`](#function-key_symbol)
- [`set_key_symbol`](#function-set_key_symbol)

<a id="function-new"></a>

### new

```rust
fn new(device: Rc<dyn IInputDevice>, timestamp: u64, root: Rc<dyn IInputRoot>, type_: RawKeyEventType, key: Key, modifiers: RawInputModifiers, physical_key: PhysicalKey, key_symbol: Option<String>, key_device_type: KeyDeviceType) -> Self
```

Creates raw key event args.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/raw/raw_key_event_args.rs#L30)

<a id="function-key"></a>

### key

```rust
fn key(self: &Self) -> Key
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/raw/raw_key_event_args.rs#L53)

<a id="function-set_key"></a>

### set_key

```rust
fn set_key(self: &Self, value: Key)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/raw/raw_key_event_args.rs#L57)

<a id="function-modifiers"></a>

### modifiers

```rust
fn modifiers(self: &Self) -> RawInputModifiers
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/raw/raw_key_event_args.rs#L62)

<a id="function-set_modifiers"></a>

### set_modifiers

```rust
fn set_modifiers(self: &Self, value: RawInputModifiers)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/raw/raw_key_event_args.rs#L66)

<a id="function-type_"></a>

### type_

```rust
fn type_(self: &Self) -> RawKeyEventType
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/raw/raw_key_event_args.rs#L71)

<a id="function-set_type"></a>

### set_type

```rust
fn set_type(self: &Self, value: RawKeyEventType)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/raw/raw_key_event_args.rs#L75)

<a id="function-physical_key"></a>

### physical_key

```rust
fn physical_key(self: &Self) -> PhysicalKey
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/raw/raw_key_event_args.rs#L80)

<a id="function-set_physical_key"></a>

### set_physical_key

```rust
fn set_physical_key(self: &Self, value: PhysicalKey)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/raw/raw_key_event_args.rs#L84)

<a id="function-key_device_type"></a>

### key_device_type

```rust
fn key_device_type(self: &Self) -> KeyDeviceType
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/raw/raw_key_event_args.rs#L89)

<a id="function-set_key_device_type"></a>

### set_key_device_type

```rust
fn set_key_device_type(self: &Self, value: KeyDeviceType)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/raw/raw_key_event_args.rs#L93)

<a id="function-key_symbol"></a>

### key_symbol

```rust
fn key_symbol(self: &Self) -> Option<String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/raw/raw_key_event_args.rs#L97)

<a id="function-set_key_symbol"></a>

### set_key_symbol

```rust
fn set_key_symbol(self: &Self, value: Option<String>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/raw/raw_key_event_args.rs#L101)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`IRawInputEventArgs`](/docs/0.5.0/api/ferroui-base/input/raw/trait-irawinputeventargs/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
