Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I try to control my mouses absolute position with a stay-put, two-axis joystick. I want this running on a windows 7. I already tried many different programs as

  • jmouse
  • Xpadder
  • Joymouse
  • joy 2 mouse

joy 2 mouse works best for me so far, as I can control the x- and y-axis with the absolute position of the joystick, but i came across 2 problems

  1. the mouse stutters sometimes, even when I am not moving the joystick
  2. I can only set the "up-y-axis" and the "down-y-axis", so that there is a small angle around the root position of the joystick, where no mouse movement is applied.

For me it would also work, if someone knows a reliable way to get just the exact position of this joystick (on win7), then I can set the mouse position myself.

The imprecision of the joystick is caused by the software. I got the same hardware working properly on my mac.

share|improve this question

I found a solution myself by handling the joystick events and mouse position with python, pygame and win32api

import pygame, sys,os
import win32api, win32con
from win32api import GetSystemMetrics
from pygame.locals import * 

width = GetSystemMetrics (0)
height = GetSystemMetrics (1)

joystick = pygame.joystick.Joystick(0)
joystick = joystick.init()
while 1: 
    for event in pygame.event.get(): 
          if event.type == QUIT: 
            if event.type == 7:
                if event.axis==0:
                    a = (event.value + 1)/2
                    x,y = win32api.GetCursorPos()
                elif event.axis==2:
                    a = (event.value + 1)/2
                    x, y = win32api.GetCursorPos()

This might not be a solution for everyone, because it is to be compiled and all dependencies need to be included. But in this way, it is possible to control all mouse events very precise. It is a small code snippet and pretty straightforward. It is based on the simple pygame event loop.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .