Global mouse events

Is there a way in Blueprint to capture all mouse events (left/right button down/up, movement) regardless of the actor behind the mouse cursor?

Example for handling left mouse button globally:

  1. Add a mapping in Project Settings / Input / Bindings / Action Mappings for the Left Mouse Button. Give it a descriptive name like “ActionMappingLeftMouseButton” to allow for easy searching.

  2. Create a node in the Event Graph of your level blueprint (or Player Controller subclass if you have one). Look for your mapping in Input / Action Events. It is also searchable by name.

The same would work for any buttons of any input controllers listed. Plus you can define axis mappings for the continuous controls, like mouse movement.

In order to override default controls:

  1. In World Settings create a custom Game Mode
  2. In your custom Game Mode create a custom Pawn