Skip to content

Feature: Add support for Xbox gamepad controls - #18825

Open
infraredCoding wants to merge 4 commits into
files-community:mainfrom
infraredCoding:xbox-gamepad-controls
Open

Feature: Add support for Xbox gamepad controls#18825
infraredCoding wants to merge 4 commits into
files-community:mainfrom
infraredCoding:xbox-gamepad-controls

Conversation

@infraredCoding

Copy link
Copy Markdown

Resolved / Related Issues

To prevent extra work, all changes to the Files codebase must link to an approved issue marked as Ready to build. Please insert the issue number following the hashtag with the issue number that this Pull Request resolves.

Steps used to test these changes

Stability is a top priority for Files and all changes are required to go through testing before being merged into the repo. Please include a list of steps that you used to test this PR.

  1. Opened Files
  2. Made sure an XBox Controller is connected (wired or wireless)
  3. Used Left Joystick to move around the cursor
  4. Used A to select an item, double press A to open the selected file/folder (Simulates Left Mouse Click)
  5. Used B to go back to previous/parent folder or cancel dialog
  6. Used X to simulate right mouse click
  7. Used right joystick to Scroll.
  8. Used D-Pad buttons as just Arrow Keys

@CLAassistant

CLAassistant commented Aug 17, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@yair100
yair100 requested review from 0x5bfa and Josh65-2201 August 17, 2026 16:19
@yair100 yair100 added the ready for review Pull requests that are ready for review label Aug 17, 2026

@Josh65-2201 Josh65-2201 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend adding the below controls.

Left trigger > Left click
Right trigger > Right click
Hold left trigger + Left stick > Click and drag

If the context menu/flyout is open, B should close it and not go back a folder.

Using the mouse, no hover event's are triggered and highlights/information isn't visible

Files is goes into an unrecoverable crash where I have to restart the system, this seem to be when anything in the omnibar has it's drop down open

@Josh65-2201 Josh65-2201 added changes requested Changes are needed for this pull request and removed ready for review Pull requests that are ready for review labels Aug 17, 2026

@0x5bfa 0x5bfa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use CsWin32 instead of manually defining PInvokes. Also currently the helper does nothing?

@infraredCoding

Copy link
Copy Markdown
Author

@Josh65-2201 Should I add
Left trigger > Left click Right trigger > Right click Hold left trigger + Left stick > Click and drag
as in replace the existing controls or just add them along with the existing ones?

@Josh65-2201

Copy link
Copy Markdown
Member

I don't see a reason to remove the existing ones if they don't cause conflicts

@infraredCoding

Copy link
Copy Markdown
Author

Thanks for the clarification

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

Labels

changes requested Changes are needed for this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Xbox Controller Support

5 participants