~krystianch/padmouse

Translates gamepad events into mouse/keyboard events.
Switch from sleep key emulation to shell command

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~krystianch/padmouse
read/write
git@git.sr.ht:~krystianch/padmouse

You can also use your local clone with git send-email.

#PadMouse

PadMouse translates gamepad input events into mouse/keyboard events. It was inspired by this libinput ticket.

The name is a play on the word mousepad and, at the same time, a short form of gamepad mouse.

Currently tested only with an X-Box One controller.

#Features

  • Moving the mouse with one of the gamepad's analog sticks,
  • high resolution scrolling with the other analog stick,
  • gamepad button mapping to mouse buttons or keyboard keys,
  • configurable frequency of mouse and scroll events reporting,
  • configurable analog stick sensitivities and deadzones,
  • enabling/disabling the mouse/keyboard emulation via a gamepad button,
  • triggering a shell command on gamepad poweroff,
  • waiting for the specified deivce to be connected.

#Usage

To build run make in the project's root.

Check the name of the gamepad you want. You can use evtest for this. Run evtest without arguments and it will print the names of all input devices.

Run padmouse and pass the name of the gamepad to it. For example:

padmouse -e 'Microsoft X-Box One pad'

#Arguments

Usage: padmouse [-f freq] [-m sens] [-s sens] [-d deadzone] [-z on_poweroff] [-e] [-w] GAMEPAD_NAME

  • -f freq -- analog stick tracking frequency (float, default: 60.0)
  • -m sens -- mouse sensitivity (float, default: 800.0)
  • -s sens -- scroll sensitivity (float, default: 4000.0)
  • -d deadzone -- deadzone of analog sticks (float, default: 0.15)
  • -z on_poweroff -- a shell command to execute on X-Box gamepad poweroff
  • -e -- enable event translation on startup
  • -w -- wait for the gamepad to be connected if it's not present
  • GAMEPAD_NAME -- name of the gamepad to use

#Similar software