Simulate controller input

William A Wang 251 Reputation points
2024-07-10T13:58:33.3866667+00:00

As far as I know in user32.dll there are 2 functions keybd_event & mouse_event which can simulate keyboard & mouse inputs. Is that possible to simulate the Xbox controller inputs programmatic.

Thanks.

Windows for business Windows Client for IT Pros User experience Other
Developer technologies .NET Other
{count} votes

1 answer

Sort by: Most helpful
  1. Yanhong Liu 14,195 Reputation points Microsoft External Staff
    2024-07-11T06:26:18.02+00:00

    Hello,

    Thank you for posting in Q&A forum.

    As far as I know, there is no way to simulate Xbox controller input programmatically directly, based on user32.dll for keyboard and mouse input etc.

    The functions keybd_event and mouse_event you mentioned are part of the Windows API for simulating keyboard and mouse events, but there is no direct equivalent in the Windows API for Xbox controller input.

    I hope the information above is helpful.

    Best Regards,

    Yanhong Liu

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.