Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7895083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:33:23+00:00 2026-06-03T07:33:23+00:00

I am making an application to control the mouse using an analog stick from

  • 0

I am making an application to control the mouse using an analog stick from a gamepad for Mac OS X (10.7.3).
Currently it is working pretty well, I can control the cursor in desktop and most games.
But in Team Fortress 2, I cant control the aim, but can control the cursor in the menu. Mouse wheel and clicks works everywhere.
Another strange thing is that when I move the real mouse, the aim “jumps” the traveled distance from my “virtual mouse” before aiming normally, so it somewhat is receiving the events.

The game option “Raw mouse input” is disabled (I think it is not even supported in osx). And a similar application can controle the aim successfully.

I suspect the game is looking for “delta movement” or “relative movement” events or anything similar, but my code sets the position of the cursor using absolute positions. Not sute how to change this.

Here is the snippet of code used to send mouseMoved events:

EDIT: Crappy code removed!

.
EDIT:

Also, because I did this way, I need to check the screen bounds manually to prevent the cursor going Crazy. So in multi-screen setups, and when the user change the resolution, it gets worst. Would be so much better if I can just send the amount of movement and let the OS take care of constraining the cursor.

.

The question is:
I am doing the mouse move events the wrong way?

How can I fix this?

EDIT2:
So, that was just a stupid bug, sorry =P

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T07:33:24+00:00Added an answer on June 3, 2026 at 7:33 am

    I just forgot to call CGSetIntegerValueField(kCGEventMouseDeltaX, …) (and Y) with the delta values… =P

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently making a WP7 application with a pivot control. I am making use
I'm making an application that contains button's and those buttons control an embedded browser.
I'm new to Rails and making application where college members (teachers and students) can
I am making an application (iPhone app) which gets information (jokes) from an RSS
I am making an application that involves controlling Safari from Applescript. Is there a
I'm making in house application that download data via xml files from external server.
I am using a Microsoft Chart control (system.windows.forms.datavisualization.charting.chart) in a Windows forms application, vb.net
I am programming with Visual Studio 2008 and making a web application using .NET
Am making an application in WP7 using Windows Phone SDK 7.1 / C# Am
I am currently making an app that will control and make use of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.