Skip to content

add gamepad navigation support - #7686

Draft
notimaginative wants to merge 1 commit into
scp-fs2open:masterfrom
notimaginative:gamepad_navigation
Draft

add gamepad navigation support#7686
notimaginative wants to merge 1 commit into
scp-fs2open:masterfrom
notimaginative:gamepad_navigation

Conversation

@notimaginative

Copy link
Copy Markdown
Contributor

Gamepad navigation is enabled by default but can be disabled with settings. As the retail FreeSpace UI system doesn't lend itself all that well to proper gamepad mechanics, the gamepad inputs instead mimic a mouse and keyboard.

Gamepad navigation is only active when at least one gamepad is connected and the mouse cursor is set to visible in the game. One exception is gamepad camera controls (Lab), where no cursor check is performed.

A gamepad does NOT need to be set as a current joystick in order to work for navigation. This allows for a gamepad (real or virtual, if recognized by SDL) to be used for UI navigation without affecting the control setup used for gameplay.

When gamepad navigation is enabled it also enables Dear ImGui's native gamepad navigation support. While in the Lab or In-game Settings the ImGui gamepad navigation controls will be used instead of the normal FreeSpace-style navigation controls.

FreeSpace gamepad navigation controls:

Mouse

The cursor is controlled via the Left Stick.
Left click is simulated via the Action button (A / Cross, by default) Right click is simulated via the X / Square button

Keyboard

Although they are used inconsistently, with usage and purpose occasionally varying between different menus, the retail UI code generally uses the following keyboard keys for navigation:

The ESC key is simulated via the Cancel button (B / Circle, by default) The Arrow keys are simulated via D-Pad
The TAB key is simulated via the Right Shoulder button The Shift-TAB combo is simulated via the Left Shoulder button The Page Down key is simulated via the Left Trigger The Page Up key is simulated via the Right Trigger

Dear ImGui gamepad navigation controls:

The gamepad is supported directly without simulating Mouse/Keyboard inputs. ImGui control layout infographics are available at: https://www.dearimgui.com/controls_sheets/

Camera controls (used in the Lab & chosen to not conflict with ImGui):

Right Stick: Orient the displayed object
Right Stick + Left Trigger: Rotate the camera
Right Stick + Right Trigger: Zoom the camera in or out
Right Stick + Both Triggers: Pan the camera on the X/Y plane

Gamepad navigation is enabled by default but can be disabled with settings. As
the retail FreeSpace UI system doesn't lend itself all that well to proper
gamepad mechanics, the gamepad inputs instead mimic a mouse and keyboard.

Gamepad navigation is only active when at least one gamepad is connected and
the mouse cursor is set to visible in the game. One exception is gamepad camera
controls (Lab), where no cursor check is performed.

A gamepad does NOT need to be set as a current joystick in order to work for
navigation. This allows for a gamepad (real or virtual, if recognized by SDL)
to be used for UI navigation without affecting the control setup used for
gameplay.

When gamepad navigation is enabled it also enables Dear ImGui's native gamepad
navigation support. While in the Lab or In-game Settings the ImGui gamepad
navigation controls will be used instead of the normal FreeSpace-style
navigation controls.

FreeSpace gamepad navigation controls:

Mouse
--------
The cursor is controlled via the Left Stick.
Left click is simulated via the Action button (A / Cross, by default)
Right click is simulated via the X / Square button

Keyboard
---------
Although they are used inconsistently, with usage and purpose occasionally
varying between different menus, the retail UI code generally uses the
following keyboard keys for navigation:

The ESC key is simulated via the Cancel button (B / Circle, by default)
The Arrow keys are simulated via D-Pad
The TAB key is simulated via the Right Shoulder button
The Shift-TAB combo is simulated via the Left Shoulder button
The Page Down key is simulated via the Left Trigger
The Page Up key is simulated via the Right Trigger

Dear ImGui gamepad navigation controls:

The gamepad is supported directly without simulating Mouse/Keyboard inputs.
ImGui control layout infographics are available at:
https://www.dearimgui.com/controls_sheets/

Camera controls (used in the Lab & chosen to not conflict with ImGui):

Right Stick: Orient the displayed object
Right Stick + Left Trigger: Rotate the camera
Right Stick + Right Trigger: Zoom the camera in or out
Right Stick + Both Triggers: Pan the camera on the X/Y plane
@notimaginative notimaginative added enhancement A new feature or upgrade of an existing feature to add additional functionality. controls A feature or issue related to input devices or actions controlled/triggered by them ui A feature or issue specific to the menus portion of the user interface labels Aug 5, 2026
@notimaginative

Copy link
Copy Markdown
Contributor Author

Setting as draft as it will require some sort of update/fix once #7652 gets merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

controls A feature or issue related to input devices or actions controlled/triggered by them enhancement A new feature or upgrade of an existing feature to add additional functionality. ui A feature or issue specific to the menus portion of the user interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant