Jump to content
The simFlight Network Forums

Button programming question


Recommended Posts

Hi Pete,

A little question about button programming. I have programmed a button on my joystick to send CTRL-F9.

This works fine, but now I want to send this action to my client to do the trick over there.

I'm a bit confused how to set this up in my wideclient.ini file.

And what I have to do with the wideserver.ini?

The button is on my joystick (number 0) and is button 9 and has to send CTRL-F9.

FSUIPC and wideclient registered.

Hope you can explane.

Kind regards

Jan Geurtsen

Link to comment
Share on other sites

This works fine, but now I want to send this action to my client to do the trick over there.

I'm a bit confused how to set this up in my wideclient.ini file.

And what I have to do with the wideserver.ini?

Neither FSUIPC nor WideFS send keystrokes or buttons over the connection to Clients. There is a mechanism in WideFS caled "KeySend", which sends an arbirary reference number across, 1-255. All you do it program a key or button in FSUIPC to operate the KeySend command, with a parameter 1-255 to identify it. Then in your selected WideClient.ini file you declare the key Press you want that KeySend number to create.

This is covered in the WideFS documentation, and the KeySend is also mentioned in FSUIPC documentation. Please do have a look sometime.

WideServer.ini doesn't come into it any more. That method, designed for ISA Epic cards, has not been the best method for several years.

Regards,

Pete

Link to comment
Share on other sites

I read the manual, but don't understand what to do.

So can you give me a example for the button I'll need, the one in the first message.

I'd really much rather understand WHAT in the manuals you don't understand. This is the only way they'll get improved so that I don't get asked the same questions over and over.

I told you exactly what to do in FSUIPC. Did you manage that? Please clarify exactly what it is you are asking and why things are so obscure in the documentation. :cry:

Regards,

Pete

Link to comment
Share on other sites

  • 2 weeks later...

Hi Peter I own a professional PFC console. I programmed in registred FSUIPC different buttons for different aircrafts (for instance PMDG 737) without any trouble. You did a great great job. Now I want fly on line (IVAO) so I'd like to program one of joke buttons to send a command (in this case key board K for push to talk functions) to a wideclient computer where I have Teamspeak 2 (voice program).

I read both FSUIPC and widefs User guide, but I think it should be easier to have your input.

So can you start from scratch explaining to me how to do it step by step?

Have I to do anything in widefs server or client ini file or is it an automatic procedure starting from FSUIPC? Thanks

Link to comment
Share on other sites

I'd like to program one of joke buttons to send a command (in this case key board K for push to talk functions) to a wideclient computer where I have Teamspeak 2 (voice program).

Roger Wilco and AVC are easy. So far TeamSpeak has not proven possible. I have asked users if they can get TeamSpeak to add facilities for PTT to be controlled from another program or via normal keypresses, but nothing has happened in months.

Both RW and AVC provide registered messages to allow PTT on and PTT off, and these can be driven either directly from FSUIPC (using the PTT on/off controls it adds), or through WideFS using the KeySend facilities -- specific examples are given for this already.

But at present TeamSpeak is not amenable to any treatment I can dish out with any of my programs. It does not appear to accept keyboard messages sent to it normally. I assume it captures true keyboard events only.

Regards,

Pete

Link to comment
Share on other sites

Hi Pete many thanks for your quick replay. The last Teamspeak 2 has an option setting to have a command PTT via normal keypresses. When in remote wide client pc i press key board for an instance assigned K, I can talk. But I'd like to do this function (remote key board K press) directly from one of the joke buttons of my console (connected via PFC dll to to the server pc where i have MSFS and FSUIPC).

Is it possible with the "KeySend" function or I need a specific PTT program as you told me?

Thanks

Link to comment
Share on other sites

The last Teamspeak 2 has an option setting to have a command PTT via normal keypresses. When in remote wide client pc i press key board for an instance assigned K, I can talk.

You misunderstood me. I know it can use the keyboard, but from what everyone has told me this is not "normal" in the sense that it gets the keys from normal Windows keyboard messages, such as those WideClient can produce. I think it must be using direct keyboard access -- interrogating keys in real time, not processing them via the message queue.

But I'd like to do this function (remote key board K press) directly from one of the joke buttons of my console

I know what you want, that's what I replied to. (BTW I thought your "joke" (ha-ha) was a misprint last time. We spell and pronounce it "yoke").

Is it possible with the "KeySend" function or I need a specific PTT program as you told me?

What's a specific PTT program? I did not mention any specific program.

As far as I know, it is not possible to do what you want at present with TeamSpeak, only with RW and AVC. Please press your requirements on the TeamSpeak authors. I can accommodate anything reasonable, but there is no reasonable solution at present.

Regards,

Pete

Link to comment
Share on other sites

Pete,

I have been trying to get Teamspeak to work and discovered the problem you describe. My question is why does it work when running on the same PC as FSUIPC and not with wideFS? What is different on how you generate keypresses?

thx,

lee

Link to comment
Share on other sites

I have been trying to get Teamspeak to work and discovered the problem you describe. My question is why does it work when running on the same PC as FSUIPC and not with wideFS? What is different on how you generate keypresses?

Sorry, I don't quite understand. are you saying it works from a Button programmed in FSUIPC to send a KeyPress to FS? Or do you just mean that the keypress works when used on the PC which is running TeamSpeak?

If the former is true, then it sounds like TeamSpeak may be intercepting Windows messages specifically aimed at FS. Can this be so? Do you tell it somewhere that FS is the program you want it to work with?

On a WideClient PC the substitute for FS is Wideclient itself. Perhaps if you programmed your Button to send KeySend1 on pressing and KeySend2 on release, then, in WideClient.ini added something like:

KeySend1=74,16,FS98MAIN

KeySend2=74,24,FS98MAIN

This will press "K" and release "K" respectively, and send these to WideClient, which is using the same Class name (FS98MAIN) as FS does.

Try that as it stands. If that doesn't work, try adding "PostKeys=Yes" to the WideClient.ini, too. This makes WideClient post the messages instead of "replaying" them as if from a recorder.

If neither work, yet the programmed button works on the FS PC, then there must be something different in the "SendInput" system I use in FSUIPC. Wideclient doesn't use SendInput at present, but I can look at adding it -- let me know what you find please.

Regards,

Pete

Link to comment
Share on other sites

Pete,

Negative on all fronts.

I tried your suggestions and it made no difference.

Interestingly, when Postkeys=yes, I was not able to get a keypress to any program.

What does work is Teamspeak running on the SAME PC as FS. When a button is programmed to key Teamspeak on the SAME PC as FS, it works fine. When attempting to run TS on a remote PC with WideFS, it does not work.

I believe your last idea was probably correct. There is some difference in your use of SendInput with FSUIPC and WideFS.

Thanks!

Lee

Link to comment
Share on other sites

I believe your last idea was probably correct. There is some difference in your use of SendInput with FSUIPC and WideFS.

WideFS didn't use SendInputuntil WideClient 6.417 that is.

Didn't you get my email yet with a version 6.417 of WideClient to test? It includes a "SendInput" option.

Regards,

Pete

Link to comment
Share on other sites

Sorry Pete, no luck.

I tried 6.417 as you requested but it did not make a difference.

Just so you know what I did.

1. I tested WideFS 6.417 with WordPad. When I run WordPad from WideFS and send the keys, the correct key is displayed (K).

2. I changed the setup but used Teamspeak instead of Wordpad. I pressed the "K" on the keyboard and the transmit light works. When I pressed the joystick button, nothing happens. If I change focus to WideFS, the focus goes back to Teamspeak when I press the button.

Any other clues?

Lee

Link to comment
Share on other sites

Any other clues?

Well, assuming you set the parameters correctly, WideClient is now doing EXACTLY the same as FSUIPC. In fact that's how I modified it so quickly -- I copied the FSUIPC code for that action.

Set Log=Debug in the WideClient.ini, try again, then ZIP up the WideClient.LOG file and send it to me -- you can reply to my earlier email for that. Include your WideClient.INI file please.

What operating system are you using on the Client? The SendInput facility isn't available on them all. What O/S is on the Server?

Regards,

Pete

Link to comment
Share on other sites

I tried 6.417 as you requested but it did not make a difference.

... Any other clues?

Lee,

Since this last Forum message of yours we have exchanged several messages by email. The last such email I received from you said

Just curious, are you going to do anything else with this? There was someone on the forum asking for a solution. Is this the solution or do you plan further investigation.

I must admit to not seeing anyone else here asking since your good self, but what is more puzzling is that I am still waiting for confirmation from you that version 6.418 of WideClient, sent to you on the 8th December, works okay. You seem to have sent me a message which indicates that you are no longer seeing my emails.

This is made worse by the fact that I replied to your last email 31 hours ago, again attaching the Wideclient, and this time as a priority message, and still I have seen no acknowledgement.

The messages are not bouncing at all. I can only think you are either ignoring them, or that they are being deleted at your end as spam, for some strange reason.

I am hoping to make a release later this coming week or WideFS 6.44 and would like to be able to document how to use this new facility to enable PTT programming for Teamspeak. Do you think you could try the latest Beta for me, please, and let me know?

For information, I append my message of the 8th below.

Regards,

Pete

====================

Hi Lee,

> The button events are always detected by TS as an ESC character

> when using WideFS. I don't know why but they just are. Oddly

> enough, the characters are input into other programs correctly, they

> are just always interpreted by TS as an ESC when WideFS is used and

> detected normally with FSUIPC.

Aha! Great find!

The code I pinched from FSUIPC was okay -- but one of the parameters I

was providing it was wrong, the "scan code". I had the high and low parts

of a double word, used for the normal way WideClient sends keys,

swapped over wrongly for SendInput!

Please try the attached WideClient version 6.418.

> 2. The SendInput must be turned on for TS to receive the ESC

> character. Nothing happens if SendInput=NO.

I think SendInput gets these things placed on a lower level in Windows --

the other methods do only get messages through to the current focus or

specified Window. This is why TS cannot intercept them.

> 3. The key code modifiers do not make any difference. ESC is always

> detected regardless of the modifier (ctl, shift, etc).

Should be fixed. Please let me know.

> 4. As you mentioned earlier, the "run" parameter does not make any

> difference. In fact, if you specify the parameter with SendInput=Yes, it

> no longer works. There is no way to direct the ESC to TS.

Since it is intercepting keys rather than processing received messages you

mustn't direct the keypresses for TS. Correct.

Please let me know the results with 6.418. I think it should be okay now.

Thanks for your help.

Regards,

Pete

Link to comment
Share on other sites

Hello ,

I am working on a simhardware cockpit layout setup for a Beechcraft58, the airplane I flew myself for hours.

My intension is to make a hardware panel with all switches en twin engine input and fulll radio panel a/p controls by making use of the USB Bus.

For that reason I already got 2 prints working with 6 analogue en 16 switch inputs each that read as extra USB Game control.

I like to extend with some additional prints via the USB Game control.

My question is - when getting FSUIPC:

- is there a maximum number of i/o prints, using FSUIPC, that can be put via the USB Game control?

- is there a maximum number of inputs per each USB Game control print with FSUIPC?

- is there a total number of inputs that FSUIPC can handle via USB Game control prints?

Info would be most welcome.

Kind regards,

Jan L.F. Bos

jlfbos@iclass.nl

Link to comment
Share on other sites

My question is - when getting FSUIPC:

- is there a maximum number of i/o prints, using FSUIPC, that can be put via the USB Game control?

- is there a maximum number of inputs per each USB Game control print with FSUIPC?

- is there a total number of inputs that FSUIPC can handle via USB Game control prints?

Sorry, I don't really understand the question here. What do you actually mean by "prints"? To me, a print is a copy of a photograph or a photocopied or printed piece of paper. I'm sure you don't mean that.

Anyway, I'll try to answer what you may be asking.

First, FSUIPC does not interface to USB, Game Port, or any other hardware directly. For buttons it can input from EPIC (via EPIC.VXD for ISA EPic only, via EPICIO.DLL otherwise), from Go Flight devices 9via GFDEV.DLL), and from the Windows joystick API.

The Windows joystick API supports up to 16 joysticks each with up to 32 buttons. That is therefore the limit for FSUIPC. However, in addition, FSUIPC will convert a single "point of view" control (POV) on each of the 16 joysticks to up to 8 separate buttons, the 8 cardinal directions.

FSUIPC does not use DirectInput, so its coverage doesn't extend to the extras that can make available.

Regards,

Pete

Link to comment
Share on other sites

Hi Pete,

Sorry for the confusion. With prints I ment Printed Circuit Boards (PCB).

To clarify my question:

I have 2 PCB’s from Leo Lacava with each 6 analogue and 16 switch i/o's per PCB.

These PCB’s have USB output and simulate as a Gamepad. And not as a Keyboard.

So next to my ChVirtual Pilot Pro Gamepad I do see in the Windows Gamepad these 2 extra PCB’s.

In flight in FlSim under Options-Controls-Assignments I can perfectly assign functions to the additional switches and 100K potentiometers:

e.g. I designated the 6 analogue inputs to Throttle 1, 2, Prop 1, 2 and Mixt. 1,2.

My intention is to put more switching input for a Beechcraft 58 hardware input panel by means of multiple USB PCB’s that all simulate as a Gampad.

So I get a panel with multiple switches, incl. Com, Nav, A/P, so as to be able to make nice IFR simulated flights, being able to control the various switch inputs convenient and direct from a hardware panel.

I tried with an older version of FSUIPC to assigning all these extra i/o finctions of the additional PCB’s, so the “extra” Gamepads, and that goes very well.

My question is, before getting an up-to-date version FSUIPC:

- is there a maximum number of Gamepads (read: additional PCB’s to be produced ) that can be put parallel under Windows as USB Game control?

- is there a maximum number of analogue and switch i/o inputs per each single USB Game control PCB?

Reason is that Leo Lacava had a single USB game adapter i/o board, providing 128 ( ! ) switch inputs.....

- is there a total number of input lines that FSUIPC can handle, (via USB Game control prints) in the FSUIPC configuration file?

I hope I have been able to make my questions more clear.

Highly appreciating your feedback,

Kind regards,

Jan L.F. Bos

Netherlands

Link to comment
Share on other sites

Sorry for the confusion. With prints I ment Printed Circuit Boards (PCB).

Oh, right. I don't think Windows knows about PCBs. Certainly this isn't a recognisable unit of anything as far as FSUIPC is concerned.

- is there a maximum number of Gamepads (read: additional PCB’s to be produced ) that can be put parallel under Windows as USB Game control?

Sorry, I have absolutely no idea. I think Windows, or maybe the USB specification, has a limit of 128 devices, but that may be per USB connection, not overall.

- is there a maximum number of analogue and switch i/o inputs per each single USB Game control PCB?

Again, I have no idea. I am not a hardware expert and know nothing about USB.

- is there a total number of input lines that FSUIPC can handle, (via USB Game control prints) in the FSUIPC configuration file?

There's a maximum number of programmable entries in the INI file, yes. I don't remember what it is now -- it is mentioned in the documentation. It isn't at all related to USB or Game controllers or PCBs, which FSUIPC knows absolutely nothing whatsoever about.

I hope I have been able to make my questions more clear.

Well, not really. You seem to think I am some sort of hardware expert, which I am not. As I explained in my last answer, for buttons FSUIPC uses the Windows joystick API. That is limited to 16 joystick devices, each with 32 buttons and one POV. That's the limit. How your PCBs relate to joystick devices I have no idea. Sorry.

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.