# I want to create Keyboard Shorcut in Editor Viewport because I need mouse position.

**URL:** <https://forums.unrealengine.com/t/i-want-to-create-keyboard-shorcut-in-editor-viewport-because-i-need-mouse-position/1816679>\
**Category:** Programming & Scripting\
**Tags:** Editor-Utility, unreal-engine, editor, Blueprint, question\
**Created:** [April 23, 2024, 7:46am UTC](https://forums.unrealengine.com/t/i-want-to-create-keyboard-shorcut-in-editor-viewport-because-i-need-mouse-position/1816679 "2024-04-23T07:46:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AngelAvellaneda](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AngelAvellaneda](https://forums.unrealengine.com/u/AngelAvellaneda)\
**Post date:** [April 23, 2024, 7:46am UTC](https://forums.unrealengine.com/t/i-want-to-create-keyboard-shorcut-in-editor-viewport-because-i-need-mouse-position/1816679/1 "2024-04-23T07:46:11Z")

</div>

I want to create Keyboard Shorcut in Editor Viewport because I need mouse position, It can be with Blueutility or Editor Widget but I need to fire the key while im focus in viewport.

---

<div class="post-metadata">

**Author:** ![Nawrot](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nawrot/32/618260_2.png) [@Nawrot](https://forums.unrealengine.com/u/Nawrot)\
**Post date:** [April 23, 2024, 8:18am UTC](https://forums.unrealengine.com/t/i-want-to-create-keyboard-shorcut-in-editor-viewport-because-i-need-mouse-position/1816679/2 "2024-04-23T08:18:08Z")

</div>

You need to create enhanced input system and bindings:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/d/4/2d49ee3f75e897f6abac6b328bbf586a7baf37f9.jpeg "How to Easily Use the NEW Enhanced Input Action System in Unreal Engine 5.1") ](https://www.youtube.com/watch?v=CYiHNbAIp4s&t=395s)

---

<div class="post-metadata">

**Author:** ![AngelAvellaneda](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AngelAvellaneda](https://forums.unrealengine.com/u/AngelAvellaneda)\
**Post date:** [April 23, 2024, 8:26am UTC](https://forums.unrealengine.com/t/i-want-to-create-keyboard-shorcut-in-editor-viewport-because-i-need-mouse-position/1816679/3 "2024-04-23T08:26:22Z")

</div>

Hi Nawrot, and how i would implement the input system for editor viewport in a blueutility or editor widget?

---

<div class="post-metadata">

**Author:** ![Nawrot](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nawrot/32/618260_2.png) [@Nawrot](https://forums.unrealengine.com/u/Nawrot)\
**Post date:** [April 23, 2024, 8:57am UTC](https://forums.unrealengine.com/t/i-want-to-create-keyboard-shorcut-in-editor-viewport-because-i-need-mouse-position/1816679/4 "2024-04-23T08:57:40Z")

</div>

Oh that was for editor widget, i don’t think you can.

But uncle google gave me this:

> **[Custom Unreal Editor Keyboard Shortcuts Using Commands](https://minifloppy.it/posts/2024/custom-unreal-editor-keyboard-shortcuts-using-commands/)**
>
> A tutorial explaining how to create custom keyboard shortcuts inside the Unreal Editor using commands in C++.

---

<div class="post-metadata">

**Author:** ![AngelAvellaneda](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AngelAvellaneda](https://forums.unrealengine.com/u/AngelAvellaneda)\
**Post date:** [April 23, 2024, 9:39am UTC](https://forums.unrealengine.com/t/i-want-to-create-keyboard-shorcut-in-editor-viewport-because-i-need-mouse-position/1816679/5 "2024-04-23T09:39:46Z")

</div>

Thank for your answer, but i would prefer no to use c++, I see a method to detect inputs in editor, but only work when the Utility Widget is focused, maybe there is a way to use it without focus.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/0/6/f060865f66b079a38f93be14d967bfe087db9822.png)
