Unaffiliated

Home Documentation & Help
Steamworks Documentation
Mouse Regions
Certain inputs can be mapped to "mouse regions", which send mouse input to the game, but map the input's total range of movement 1:1 with screen space, which means e.g. that touching a specific location on, say, a touch pad, will always put the cursor at the same place on the screen. In addition to working great for top-down style games, regions can be restricted to certain areas of the screen, scaled, stretched and mode-shifted in to select mini-maps, toolbars, inventory, etc.

For example, you can use this in legacy mode for games that require precision clicking on UI elements in fixed locations.

Note that mouse regions do not fire any actions or mouse events automatically, by default they just control the mouse position. If you want to additionally fire actions or mouse events you must specifically apply those bindings in your configuration.

Examples


The Banner Saga

banner_saga_mouse_regions.png

This game features tactical turn-based combat, and on this particular screen there is a HUD element in the lower left that lets you select different characters. By placing an oval-shaped mouse region in the lower left hand corner and binding it to the Steam controller trackpad, we can easily select a character just by swiping left or right and clicking.

Empires of the Undergrowth

empires_of_the_undergrowth.png

This is an insect-themed Real-Time Strategy game. Here the lower left hand corner features a minimap, so placing a mouse region in that area will allow us to scroll around and quickly direct our attention where it's needed.

Visible mouse regions


If you select "Toggle Controller HUD" from the Big Picture Mode overlay, you'll see an on-screen indication of your mouse region, which is useful for setting it up the first time.

toggle_controller_hud.png

The shape of the mouse region depends on the controller and input. For example, the PS4 controller has a rectangular trackpad, which creates a rectangular mouse region, whereas the Steam controller has a circular trackpad, which creates circular mouse regions.

Device Input Mouse region shape
Generic gamepad Joystick Circle
PS4 controller Trackpad Rectangle
PS4 controller Gyro Rectangle
PS4 controller Joystick Circle
Steam controller Trackpad Circle
Steam controller Gyro Rectangle
Steam controller Joystick Circle
Xbox controller Joystick Circle


Here's what the mouse region configuration screen looks like:

mouse_region.png

Basic Settings

Region Size


This will scale the size of the region that is mapped to the outer extents of the pad/stick. You can set any value between 0.0 and 1.0, and the default value is 0.8.

At 0.8, the mouse region should cover the entire screen surface of a standard 16:9 screen, regardless of whether the mouse region shape is rectangular or circular. For a rectangular mouse region, it should map 1:1 with the screen's boundaries. For a circular region at this size, it will extend the circle far enough past in both directions to contain the entire size of the screen, with clamping applied at the edges.

Region Horizontal/Vertical Scale


This will scale the region on either axis. Acceptable values are between 0.0 and 1.0. Setting horizontal and vertical scale to different values will allow you to stretch the mouse region and achieve different rectangular and/or elliptical shapes.

Choosing 0.0 for both scales will compress your mouse region into a point.

Click Binding


This action will be triggered when you click the pad/stick.

Touch Binding

(touch controls only)

An action can be sent while touching the pad. This button will be released when you stop touching.

Horizontal/Vertical Position


These let you set the on-screen position that the mouse region is centered upon. Note that 0,0 represents the upper-left corner of the screen and 1,1 represents the lower-right.

This is the center point for the mouse region, so if you put a mouse region center in one of the four corners of the screen, effectively only 1/4 of your mouse region's area will be available -- off-screen movement will be clamped.

Haptics Intensity


This sets the intensity of the Haptic feedback (vibrations in the trackpad).

Additional Settings

Snap Mouse To Region On Mode Shift

(if used with a mode shift)

When enabling the mode shift, this controls whether the mouse should be snapped to the center of the region or not.

Snap Mouse Back on Stop


This controls whether the mouse should be snapped back to its former position when this mouse region stops receiving input. This happens when either the input source that controls it stops receiving input, or the mode shift that triggered it ends.

Trigger Press Mouse Dampening


This setting is non-functional for mouse regions, and will be removed soon.