# Shortcut key of additional UI\_COMMAND is not working.

**URL:** <https://forums.unrealengine.com/t/shortcut-key-of-additional-ui_command-is-not-working/401058>\
**Category:** Plugins\
**Tags:** command, unreal-engine, shortcuts, Plugins, question\
**Created:** [August 2, 2017, 3:00pm UTC](https://forums.unrealengine.com/t/shortcut-key-of-additional-ui_command-is-not-working/401058 "2017-08-02T15:00:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![innocentree](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@innocentree](https://forums.unrealengine.com/u/innocentree)\
**Post date:** [August 2, 2017, 3:00pm UTC](https://forums.unrealengine.com/t/shortcut-key-of-additional-ui_command-is-not-working/401058/1 "2017-08-02T15:00:24Z")

</div>

I added to some function to LevelEditor Toolbar by in custom plugin like this,

```
    UI_COMMAND(DoMyAction, "My Button", "Displays a message in output log", EUserInterfaceActionType::Button, FInputChord(EKeys::R, false, true, true, false));

```

So, It was working well when I clicked specific button in level editor toolbar, but not working with shortcut key(Ctrl + Alt + R).

How can I fix this?

please help me.

thank you.

---

<div class="post-metadata">

**Author:** ![Gregor\_Gullwi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gregor\_Gullwi](https://forums.unrealengine.com/u/Gregor_Gullwi)\
**Post date:** [August 28, 2017, 12:41pm UTC](https://forums.unrealengine.com/t/shortcut-key-of-additional-ui_command-is-not-working/401058/2 "2017-08-28T12:41:44Z")

</div>

If you are starting from the toolbar example, add this line to the StartupModule() method:

```
LevelEditorModule.GetGlobalLevelEditorActions()->Append(PluginCommands.ToSharedRef());
```

---

<div class="post-metadata">

**Author:** ![WontonGoodsoup](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WontonGoodsoup](https://forums.unrealengine.com/u/WontonGoodsoup)\
**Post date:** [August 12, 2021, 12:56pm UTC](https://forums.unrealengine.com/t/shortcut-key-of-additional-ui_command-is-not-working/401058/3 "2021-08-12T12:56:22Z")

</div>

You need to get a reference to the LevelEditorModule first:

```
FLevelEditorModule& LevelEditorModule = FModuleManager::GetModuleChecked<FLevelEditorModule>( TEXT("LevelEditor") );
LevelEditorModule.GetGlobalLevelEditorActions()->Append(PluginCommands.ToSharedRef());
```
