# HotKeyManager

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/struct-hotkeymanager/

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

```rust
struct HotKeyManager
```

Defines the `HotKey` attached property: a key gesture that clicks a
control, or executes its command, wherever the keyboard focus is within
the top-level the control is in.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/hotkey_manager.rs#L17)

## Members

- [`TYPE`](#assoc_const-type)
- [`hot_key_property`](#function-hot_key_property)
- [`set_hot_key`](#function-set_hot_key)
- [`get_hot_key`](#function-get_hot_key)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this type.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/hotkey_manager.rs#L19)

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

### hot_key_property

```rust
fn hot_key_property() -> &'static AttachedProperty<Option<KeyGesture>>
```

Defines the `HotKey` attached property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/hotkey_manager.rs#L200)

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

### set_hot_key

```rust
fn set_hot_key(target: &FerroObject, value: Option<KeyGesture>)
```

Sets the value of the `HotKey` attached property on an object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/hotkey_manager.rs#L238)

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

### get_hot_key

```rust
fn get_hot_key(target: &FerroObject) -> Option<KeyGesture>
```

Gets the value of the `HotKey` attached property on an object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/hotkey_manager.rs#L243)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)

## Availability

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