glennav8r Posted June 29, 2015 Report Posted June 29, 2015 Hi Pete I have the Mindstar GNS530 software which I have set up with some hardware and am using FSUIPC to send the key presses. The CLR button on the unit has two functions. A momentary press clears the last entry, while a 2 second press returns the unit to the default navigation page. Mindstar provide a key press for both functions but I cannot work out for the life of me how to assign the one physical button to 2 different key presses. Is this at all possible please? Regards Glenn New Zealand
Pete Dowson Posted June 30, 2015 Report Posted June 30, 2015 A momentary press clears the last entry, while a 2 second press returns the unit to the default navigation page. Mindstar provide a key press for both functions but I cannot work out for the life of me how to assign the one physical button to 2 different key presses. Is this at all possible please? Yes, you can assign as many as you like to one button press, and add conditions based on other buttons or offsets. but this can only be done by editing the entries in the settings file, FSUIPC4.INI (or in the Profiles file if you are using the seperate Profiles files in folders). There's a whole chapter on all this in the FSUIPC Advanced User's manual (see "Button Programming", as listed in the contents list on the first page), and probably lots of examples in the User Contributions sub-forum. For something as simple as two different controls or keypresses sent on alternate presses (in other words imitating a latching toggle switch with a momentary button), you would simply need to make the action dependent on the button's own 'flag', which is changed on each press. So, for button 1 on joystick 5, something like: 1=CP(-F5,1)5,1,K<keycode>,<shifts> 2=CP(+F5,1)5,1,K<keycode>,<shifts> where you'd need number the lines to avoid clashes with others, ans fill in the correct keycode and shift values -- they are listed in the Advanced User's guide too. Pete
glennav8r Posted July 1, 2015 Author Report Posted July 1, 2015 Fantastic! Thank you very much for the guidance. Glenn.
Pete Dowson Posted July 1, 2015 Report Posted July 1, 2015 Please note, I originally said "button 5 on joystick 1" but the example showed button 1 on joystick 5. Corrected now. Pete
ckovoor Posted July 1, 2015 Report Posted July 1, 2015 ......am using FSUIPC to send the key presses. The CLR button on the unit has two functions. A momentary press clears the last entry, while a 2 second press returns the unit to the default navigation page. Mindstar provide a key press for both functions..... Hi Pete, My understanding is that If Glenn needs the second button action called on a 2-second press, and not merely toggle the two button actions, then that would require a time-dependent function, which would require a lua script, in addition to editing of parameters in the .ini file, as we discussed here: http://forum.simflight.com/topic/79641-level-d-b767-mcp-with-lekseecon-f-fsuipc4-pokeys-56u-and-arduino-mega/?p=481683 Regards, Chakko
Pete Dowson Posted July 1, 2015 Report Posted July 1, 2015 My understanding is that If Glenn needs the second button action called on a 2-second press, and not merely toggle the two button actions, then that would require a time-dependent function, which would require a lua script From what he actually said, he seems to want alternate action each time he presses it.. You would be correct if he wanted to be able to select the second choice directly, hen the first choice was never made. If that is the case he could use the Lua example in the installed files. Pete
glennav8r Posted July 1, 2015 Author Report Posted July 1, 2015 It is the 2 second press Im after so with both of your advise I should be able to get this working. Thanks again Glenn
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now