Jump to content
The simFlight Network Forums

Help needed - EPIC and buttons


Recommended Posts

Dear forum members,

is anyone still working with EPIC? I remember that EPIC can emulate joytick buttons, so an input on EPIC will result in a Joystick signal and not in a keyboard signal or offset. Can anyone share sample code how this is done?

 

Best regards,

Holger

Link to comment
Share on other sites

I found it:

 

You have to put this under "VXD-Commands"

 

#define BtnOn        0x001            // activation of buttons in WinXP Game Controller
#define BtnOff        0x002

 

(no idea what 0x001 and 0x002 mean - they work for me)

 

and then a typical operational code would look like this:

 

void SPST.SWAP_NAV1.On (void)
    {
    nqw (BtnOn, 0x0100);        // this makes Joystick Buttons work in WinXP Game Controller
    }                    // The format is: 0xjjbb (jj = joystick no. in hex, bb = button no. on this
                        // joystick in hex). Example: 0x0311 is button 18 on joystick 4.
void SPST.SWAP_NAV1.Off (void)    // I use this, when I can not get offsets to work. Once the button works in     
    {                    // Game Controller, it can be programed thru FSUIPC (even to send keypresses
    nqw (BtnOff, 0x0100);        // over the network).
    }

 

Explanatory lines are by Hans Krohn from whose Cockpit.epl I took these lines.

 

Best regards,

Holger

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.