Jump to content

Allow binding controller/joystick axes as buttons


Recommended Posts

I have an x-input controller that's equivalent to an xbox 360 controller. I love using it for flying planes, but there's one problem. KSP doesn't let me bind the D-pad or analog triggers to functions like landing gear, toggle lights, action groups, etc.

The problem is that KSP detects the D-pad and triggers as axes instead of buttons (axis 5 and axis 6 for the d-pad specifically, and the triggers are weird), so it only accepts it for the axis binding functions.

It seems like it should be valid to bind each direction of an axis to the normal button functions.

For example, axis 5 negative for landing gear, axis 5 positive for lights, axis 6 negative for action group 1, and axis 6 positive for camera mode could be bound like this:


LANDING_GEAR
{
primary = G
secondary = joy0.5-
group = 0
switchState = Any
}
HEADLIGHT_TOGGLE
{
primary = U
secondary = joy0.5+
group = 0
switchState = Any
}
CustomActionGroup1
{
primary = Alpha1
secondary = joy0.6-
group = 0
switchState = Any
}
CAMERA_NEXT
{
primary = V
secondary = joy0.6+
group = 0
switchState = Any
}

Just use a default deadzone of something like 25% or 35%

This is how most games allow binding analog axes to binary commands.

Edited by zarakon
Link to comment
Share on other sites

Are you running Windows? You might try a button-mapping program. I'm running Linux and I use Antimicro; works like a charm! Antimicro is also available on Windows, so it might work for you as well. Google it!

Link to comment
Share on other sites

Are you running Windows? You might try a button-mapping program. I'm running Linux and I use Antimicro; works like a charm! Antimicro is also available on Windows, so it might work for you as well. Google it!

Yup. I use a program called Xpadder. It turns any controller into a mouse and keyboard. Ive used it for playing Minecraft on Windows with Xbox 360 controllers and the original Half Life which doesnt support gamepads.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...