Despite its age, GlovePIE is still one of the best programs to remap controllers, add your own controller and map unusual systems, like voice control, to the keyboard. It has a somewhat confusing UI and its user documentation is not user friendly.

360 controller buttons

One of the biggest uses for GlovePIE is to map a Xbox 360 controller to a keyboard which adds a controller to a PC game that does not support it.  A majority of games these days have full controller support, but for those that do not, like older titles, you can add your own. It is particularly useful with the launch of Steams Big Picture mode that makes it easy to stream to your TV and with the script below, you can add a controller to any PC game.

Xbox 360 controller script

//Left Stick – Movement
keyboard.W = XInput1.Joy1Y > 0.2
keyboard.S = XInput1.Joy1Y < -0.2
keyboard.A = XInput1.Joy1X < -0.2
keyboard.D = XInput1.Joy1X > 0.2

// Right Stick – Mouse Pointer
Mouse.DirectInputX = Mouse.DirectInputX + 10*deadzone(XInput1.Joy2X)
Mouse.DirectInputY = Mouse.DirectInputY – 10*deadzone(XInput1.Joy2Y)

// 360 Bumpers
keyboard.PgUp = XInput1.LeftShoulder
keyboard.PgDn = XInput1.RightShoulder

//360 Triggers
keyboard.Q = XInput1.RightTrigger
keyboard.P = XInput1.LeftTrigger

//360 Buttons ABXY
keyboard.space = XInput1.A
keyboard.F = XInput1.Y
Mouse.LeftButton = XInput1.B
Mouse.RightButton = XInput1.X

//360 dPad
keyboard.1 = Xinput1.Up
keyboard.2 = Xinput1.Right
keyboard.3 = Xinput1.Down
keyboard.4 = Xinput1.Left

//360 Start and Select
keyboard.esc = XInput1.start
keyboard.tab = XInput1.back

//360 Stick Clicks
Key.R = XInput1.LeftThumb
Key.E = XInput1.RightThumb

To use the script, copy and paste it out of the post and into GlovePIE’s script tab.  Once there hit the ‘Run’ button to start. If you haven’t used GlovePIE before, an introduction with installation instructions can be found here.

It is easy to alter the script to remap keys. Change the keyboard input on the left to any key on the keyboard. For example, if you want the Y key on the controller to be Q on the keyboard, find the correct line, in this case “keyboard.F = XInput1.Y” and change the keyboard.F to keyboard.Q.

If you find the mouse movement to be too slow for comfort it can be adjusted as well. Change the figures set by default at 10 in both lines here:

// Right Stick – Mouse Pointer
Mouse.DirectInputX = Mouse.DirectInputX + 10*deadzone(XInput1.Joy2X)
Mouse.DirectInputY = Mouse.DirectInputY – 10*deadzone(XInput1.Joy2Y)

I usually have it set at 40 as this mimics a reactive mouse but it does need adjustment to a level comfortable to a specific user and specific game.  For more details, have a look at the GlovePIE official site here.


Comment

  1. BasnetI 13/11/2015 at 8:23 am - Reply

    little question:
    If for any reason I would like to use the mouse pointer with the XYAB buttons of the controller.
    Could I use the “Mouse.DirectInputY = Mouse.DirectInputY – 10*deadzone(XInput1.Joy2Y)” line or it would need other kind of script.

Leave a Reply