Jump to content
The simFlight Network Forums

Buttonkeys


Recommended Posts

Hello! We are a couple of older guy's building a simulator. Our english is not so very good, so we have some problems understanding the wide client manual. So we hoped that you could perhaps explain somthing to us.

To tell you this short, we want the keypress shift+L on our client pc to preform the command instrument lights on/off on the simulator pc in fs9. Was trying to understand the manual about this, but need some extra help.

We know how to make changes in the .ini file. Type [buttonKeys], and below that T0=67,9 for shift+L? Is this right?

Should we make this changes in the ini file on the client or simulator PC? Then there was somthing about windows hotkeys in the manual. Our pc's does not have such program. Do we need to download a program like that to get this work? Do we install a hotkey manager on the client pc and take it from there? Not easy to understand all this for a coupple of old pilots like us...But time shure goes by when we try to figure it all out!

Could you please tell us how to do this, we would be very glad!

Frode and Per

Norway

Link to comment
Share on other sites

To tell you this short, we want the keypress shift+L on our client pc to preform the command instrument lights on/off on the simulator pc in fs9. Was trying to understand the manual about this

I assume you are talking about WideFS (you don't actually say anywhere what you are asking about!)?

We know how to make changes in the .ini file. Type [buttonKeys], and below that T0=67,9 for shift+L? Is this right?

67 is C, not L. How do you get L? L is 76! Please refer to the list in the Technical Guide.

T0 means you want it set Virtual Button 0 (which would show up in FSUIPC as Joystick 64, Button 0.

Should we make this changes in the ini file on the client or simulator PC?

It clearly says "To use these facilities, add the section [buttonKeys] to the WideClient.ini file." Since WideClient runs on the Client (that's why it is called "WideClient"), and the INI file for WideClient needs to go in the same folder, you can surely guess that it must be on the Client PC, right/ :-)

Then there was somthing about windows hotkeys in the manual. Our pc's does not have such program.

Sorry. Where do you get any idea that there's any "program" involved? It clearly says "WideClient provides facilities, using the built-in Windows “hot key” facilities". By "built-in" it means they are there already, part of Windows. WideClient is just USING facilities in Windows to trap key presses. See?

Could you please tell us how to do this, we would be very glad!

I explain things in the documentation. I honestly cannot explain things better, else I would have done it in the manual to save having to answer questions. It doesn't seem sensible to replace bits of the manuals here, but here goesplease note the RED bits which you seem to have missed somehow:

ButtonKeys: making use of FSUIPC’s virtual buttons facilities

FSUIPC offers facilities not only for programming real buttons and switches, but also up to 288 “virtual buttons”, represented by bits in part of its array of offsets. These 288 buttons are regarded, like real buttons, as being 32 buttons, numbered 0 to 31, on each “joystick”, with nine such “virtual joysticks” numbered 64 to 72.

WideClient provides facilities, using the built-in Windows “hot key” facilities, to convert trapped key presses into changes in FSUIPCs range of virtual button offsets. The effectively allows any controls, keypresses or other actions supported by FSUIPC on the Server PC to be instigated by key presses from the clients.

This obviously has major attractions for those using keyboard encoders in their cockpits and wishing to attach these to Networked PCs. Because the key presses are trapped using the standard Windows hot key facilities, their use is independent of the current keyboard focus. The only restrictions are on the range of such keypress combinations which are valid, and the fact that each such hot key is only validly claimed by one application, and once in that too.

To use these facilities, add the section [buttonKeys] to the WideClient.ini file. Then, for each virtual button you want to operate, add a line in the format:

Tn=,

where n is the virtual button number (in the range 0–287): 0 being Joystick 64 button 0, and 287 being Joystick 72 button 31 (remember, each joystick has 32 buttons).

is the usual virtual keycode—see the list provided earlier. Note that not all of them are usable as Windows Hot Keys. If you provide an invalid one (or one already in use here or in other programs) the line will fail. In this case the WideClient LOG file will contain an error message identifying the line in error.

are:

8 for no shift keys, just the plain key

+1 for shift

+2 for control

+4 for ALT

+32 for “Win” (the Windows key)

So, for example, the shifts value for Ctrl+Shft would be 8+1+2 = 11.

You should note that these are similar to the shift values used elsewhere in WideFs, but they are not the same. The differences are due to Windows restrictions on its Hot Key facilities.

Note that with this format of entry, when the Hot Key is pressed, the relevant virtual button is toggled: i.e. if not set, it is set, and vice versa. From the point of view of programming in FSUIPC this would look like a "Press" on the first press, and a "Release" on the second press, and so on, alternately. This seems to be the most flexible, as Windows Hot Keys do not supply any separate ‘press’ and ‘release’ indications. However, if you specifically want to Press a button with one keystroke and Release it with another, use these formats:

Pn=, to Press the virtual button

Rn=, to Release the virtual button

After you have added your line (but with 76 for L, not 67 for C), then with FS running on the FS PC, and FSUIPC options opened in the Buttons & Switches tab, when you press your "Shift+L" you'll see it identified in FSUIPC as Joystick 64, button 0. Then all yuo do is program it for you lights, or whatever else you want, as described in the FSUIPC documentation for Button programming.

Regards

Pete

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.