Glovepie script for Xbox controller (Windows)

I much prefer using a xbox controller than the mouse and keyboard for gaming. Not all games support the controller, but using a simple Glovepie script makes it possible. With a little bit of tinkering I’ve come up with a basic template, the keyboard keys/mouse buttons can easily be customised.

//Analog1
keyboard.W = Joystick2.y < -.5
keyboard.S = Joystick2.y > .5
keyboard.A = Joystick2.x < -.5
keyboard.D = Joystick2.x > .5

//Analog2
keyboard.P = Joystick2.xrot < -.5 //left-xbox
keyboard.O = Joystick2.xrot > .5 //right-xbox
keyboard.I = Joystick2.yrot < -.5 //up-xbox
keyboard.U = Joystick2.yrot > .5 //down-xbox

//dpad
keyboard.1 = Joystick2.POV1Up
keyboard.2 = Joystick2.POV1Right
keyboard.4 = Joystick2.POV1Left
keyboard.3 = Joystick2.POV1Down

//Start and Select
keyboard.enter = Joystick2.Button8 //Start
keyboard.space = Joystick2.Button7 //select

//Buttons
keyboard.E = Joystick2.Button1
keyboard.B = Joystick2.Button2
keyboard.X = Joystick2.Button3
keyboard.Y = Joystick2.Button4

//Left and Right buttons
keyboard.M = Joystick2.z > .5
keyboard.N = Joystick2.Button5
keyboard.V = Joystick2.z < -.5
keyboard.C = Joystick2.Button6

*Note: I have a game pad already in use and so my xbox controller is designated Joystick2.

Advertisements

2 Comments

Add yours →

  1. Good job with the script.

  2. Thanks. Now I just need to figure out how to do sticky keys…

Comments are closed.

%d bloggers like this: