---
id: "P:cAlgo.API.Plugin.Hotkeys"
kind: "property"
type: "T:cAlgo.API.Plugin"
url: "https://help.ctrader.com/ctrader-algo/references/General/Plugin/Hotkeys/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# Plugin.Hotkeys

Member of [Plugin](https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md).

## Hotkeys

Provides access to hotkeys API.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Plugins cannot run in the CLI: ctrader-cli runs cBots only.
- Cloud: Plugins cannot run in the cloud: it runs cBots only.

C#:

```csharp
public Hotkeys Hotkeys {get;}
```

Python:

```python
api.Hotkeys: Hotkeys
```

### Returns

`Hotkeys` — 

Available since cAlgo.API 5.4.

### Examples

C#:

```csharp
var isAdded = Hotkeys.TryAdd(Key.B, ModifierKeys.Control, args => Print("Hotkey {0}+{1} pressed", args.Modifiers, args.Key));
Print("Hotkey added: {0}", isAdded);
```

Python:

```python
from System import Action
isAdded = api.Hotkeys.TryAdd(Key.B, ModifierKeys.Control, Action[HotkeyArgs](lambda args: api.Print(f"Hotkey {args.Modifiers}+{args.Key} pressed")))
api.Print(f"Hotkey added: {isAdded}")
```

