# Using 'Capture Mouse' in a Key Event causes a crash

**URL:** <https://forums.unrealengine.com/t/using-capture-mouse-in-a-key-event-causes-a-crash/405320>\
**Category:** UI\
**Tags:** unreal-engine, crash, UI, question, Blueprint, UMG\
**Created:** [September 24, 2017, 4:15am UTC](https://forums.unrealengine.com/t/using-capture-mouse-in-a-key-event-causes-a-crash/405320 "2017-09-24T04:15:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Allar](https://forums.unrealengine.com/u/Allar)\
**Post date:** [September 24, 2017, 4:15am UTC](https://forums.unrealengine.com/t/using-capture-mouse-in-a-key-event-causes-a-crash/405320/1 "2017-09-24T04:15:53Z")

</div>

If you’re responding to a key event, i.e. OnKeyDown, inside a User Widget in blueprint and then attempt to use ‘Capture Mouse’ as part of the event reply, you will crash due to an attempt to dereference a null pointer (specifically a non-existent mouse event).

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [September 25, 2017, 5:16pm UTC](https://forums.unrealengine.com/t/using-capture-mouse-in-a-key-event-causes-a-crash/405320/2 "2017-09-25T17:16:59Z")

</div>

Hello ,

I was able to reproduce this issue on our end. I have written up a report and I have submitted it to the developers for further consideration. I have provided a link to the public tracker. Please feel free to use the link provided for future updates.

Link: [Unreal Engine Issues and Bug Tracker (UE-50288)](https://issues.unrealengine.com/issue/UE-50288)

Make it a great day
