Jump to content
The simFlight Network Forums

Setting up "Press-to-talk" from FSUIPC via WideFS


Recommended Posts

Pete,

 

 

I have the latest versions of FSUIPC4 and WideFS installed on my P3D system.

I’m running an ATC package called Pilot2ATC (P2A) on a networked PC, and I have a Cougar Joystick on my P3D sim PC

 

 

What I would like to do is create a “press to talk” capability from my Flight Sim PC (using the Cougar and assigning a button press thru FSUIPC4), and send a held down keypress over the network to be intercepted by WideFS on the network PC and pass on to Pilot2ATC to communicate a request/response?

 

 

Is this possible?

 

 

Bill Clark

Link to comment
Share on other sites

A very interesting request that I would like to know more about. I believe there are small utilities that you can run on the SIM PC which can transfer keyboard inputs to another PC connected on the same network, I am not sure if the focus should be on the desktop or if it would still work if the focus was on any window, which makes a huge difference to me (I need a Global keyboard press transmitted to the PCs). I have read something about it but I have not tried it yet. I am coming to that soon, I want a button on my main PC that will run macros on all three PCs.

Doing it in FSUIPC (if there is a way) means FSX/P3D must be running and focus set on the SIM window, but I am also looking to run a 3-macro (3PC) when FSUIPC is not running (like several programs startup sequence) and focus set anywhere on the SIM PC.

Link to comment
Share on other sites

10 hours ago, sbclark said:

What I would like to do is create a “press to talk” capability from my Flight Sim PC (using the Cougar and assigning a button press thru FSUIPC4), and send a held down keypress over the network to be intercepted by WideFS on the network PC and pass on to Pilot2ATC to communicate a request/response?

Is this possible?

Yes. Please check the "SendKey" facility out, documented in the WideFS documentation included in the package.

Pete

 

Link to comment
Share on other sites

1 hour ago, ammarmalhas said:

I am not sure if the focus should be on the desktop or if it would still work if the focus was on any window, which makes a huge difference to me (I need a Global keyboard press transmitted to the PCs). I have read something about it but I have not tried it yet. I am coming to that soon, I want a button on my main PC that will run macros on all three PCs.

Buttons can be assigned to KeySends which can be configured to do whatever you want on the client PCs. Please see the WideFS documents.

The keyboard focus needs for key presses aren't relevant for buttons.

Pete

 

Link to comment
Share on other sites

21 minutes ago, ammarmalhas said:

I went through all three documents I found in my WideFS 6.995 folder (WideFS History.pdf / WideFS Technical.pdf / WideFS User Guide.pdf) and none of them has any mention of KeySend(s)!

Er, you are completely wrong there! The KeySend facilities have log been documented in the WideFS Technical document -- way back to FS2000 or FS2002 days I think. See page 16. I just did a simple search on "KeySend" and it came up immediately!

24 minutes ago, ammarmalhas said:

They have a nice simple example of a window with some basic buttons that I want to immitate but with hardware buttons and I cannot figure out how to do that.

The "hardware button" is assigned in FSUIPC on the FS PC! The KeySend assigned there is then actioned in the Client, which sends a keystioke!

28 minutes ago, ammarmalhas said:

I looked into the FSUIPC User Guide and it shows under Button Programing paragraph (4):

But in FSUIPC you assign to a "KeySend" control, NOT a keystroke! That is the whole point! If you assign to a keystroke it gets sent to FS, not to a WideFS client!

Please PLEASE read the documentation! That is why it is there!

Pete

 

Link to comment
Share on other sites

Pete,

If I may and just to make sure I am grasping this correctly, to add a button #7 on joystick #5 to send an ALT+ENTER key to the FSX/P3D window (only not to WideFS or to Windows) I would write the following in the FSUIPC4.ini file:

[Buttons]

...

KeyboardFocus=Yes; sends the keys to the FSX/P3D window

117=P5,7,K13,16 ; Send Alt+Enter when button 7 on joy 5 is pressed

...

Is this  correct?

Do I chose arbitrary numbers for the <Entry number>?

Link to comment
Share on other sites

18 minutes ago, ammarmalhas said:

If I may and just to make sure I am grasping this correctly, to add a button #7 on joystick #5 to send an ALT+ENTER key to the FSX/P3D window (only not to WideFS or to Windows) I would write the following in the FSUIPC4.ini file:

NO NO NO!

In FSUIPC you assign a button to KeySend, with a unique parameter 1-255. Then you define the Keystroke you want in the appropriate KeySend parameter in the WideClient.INI file!!! The Keysend can be assigned to any button or any keystroke, just like any other control in the drop-down list!

20 minutes ago, ammarmalhas said:

KeyboardFocus=Yes; sends the keys to the FSX/P3D window

117=P5,7,K13,16 ; Send Alt+Enter when button 7 on joy 5 is pressed

Why on Earth do you want to send a keypress to FS?  Are you changing the subject? I thought you wanted to send a keystroke to an application on a  WideFS client PC!

PLEASE PLEASE PLEASE read the documentation! This facility has existed now forabout 15 years and no one so far has completely missed the point like this!

Pete

 

Link to comment
Share on other sites

Just now, Pete Dowson said:

NO NO NO!

In FSUIPC you assign a button to KeySend, with a unique parameter 1-255. Then you define the Keystroke you want in the appropriate KeySend parameter in the WideClient.INI file!!! The Keysend can be assigned to any button or any keystroke, just like any other control in the drop-down list!

Why on Earth do you want to send a keypress to FS?  Are you changing the subject? I thought you wanted to send a keystroke to an application on a  WideFS client PC!

PLEASE PLEASE PLEASE read the documentation! This facility has existed now forabout 15 years and no one so far has completely missed the point like this!

Pete

 

Pete,

I have changed the subject as I stated in the second line! I am just sending a keypress (combo) to FS, NOT TO WideFS or anywhere else!

I did read the documentation and hence my precise question about the format to be used to send the ... key!

In your 15 year old facility and manual, you say under the Button Programing and the "shifts" values that the "alt" and "tab" values are switched "[Note that the Tab and Alt keys are denoted by opposite bits here than when used for key programming. Apologies for this, which was a design oversight now too late to change]", BUT you never said which is the correct value for each of these?

I AM NOT MISSING THE ... POINT. SEEMS YOU ARE!

Please read what we right not what you think we do!

Link to comment
Share on other sites

Hi,

not the manual is 15 years old but that part for that facility because there was never a need to change that as it works perfect correct and so there was never the need to change that part of the manual.

The Point is that I as well as Pete misread your answer and changing of the subject where still in mind is the headlined problem. Don't forget where you might deal with your problem maybe for hours, Pete deals with all problems at the same time and tries to help to solve them and does that well know PERFECTLY WELL.

For your clear question, the value you use is wrong. As the manual clearly states (page 23) you need to add 8, so it is not 16 for ALT but 24.

8 Normal (add this in anyway)
16 Alt (take care with this one—it invokes the Menu)

When defining direct the Button to Key in FSUIPC menu you will also get

1=P0,4,K13,24  -{Key press: alt+Rtn}-   (P0,4 is just in my case here)

Also make sure the added line KeyboardFocus=Yes for the INI file goes to [Buttons] section.

Thomas

Link to comment
Share on other sites

2 hours ago, ammarmalhas said:

I have changed the subject as I stated in the second line! I am just sending a keypress (combo) to FS, NOT TO WideFS or anywhere else!

Really. Oh, sorry, I certainly didn't notice. might have been a good idea to start a new thread then?

2 hours ago, ammarmalhas said:

In your 15 year old facility and manual, you say under the Button Programing and the "shifts" values that the "alt" and "tab" values are switched "[Note that the Tab and Alt keys are denoted by opposite bits here than when used for key programming. Apologies for this, which was a design oversight now too late to change]", BUT you never said which is the correct value for each of these?

The 15 year old facility was the "KeySend" for WideFs, which you say is now irrelevant!!

On your other point here, one is talking about the encoding for how FSUIPC DETECTS keypresses for assigning to controls, the other is about ASSIGNING keypresses to controls to send to FS. They are both described and documented correctly in their respective sections. All you need to do if refer to the correct section for whatever it is you want to do.

Pete

 

Link to comment
Share on other sites

Thank you both. You have been of help as always.

I think I must have screwed things up by changing the subject and yes Pete I probably should have opened a new topic. I apologize for any dismay I may have caused either of you!

If I need to add the "8" to each of the "Shifts", then why are they not simply added already?

Pete, the "ALT" and "TAB" are different when being detected than when being assigned? Their values are interchanged? This is strange, is it not?

Link to comment
Share on other sites

9 hours ago, ammarmalhas said:

If I need to add the "8" to each of the "Shifts", then why are they not simply added already?

The bits in the result are the flags used in Windows. The values aren't treated explicitly by FSUIPC. I think it works the same either way, with or without that bit, but it was defined that way in the Windows programming references at the time.

Things in Windows changed over the years, but i like to keep FSUIPC compatible with its user applications rather than force changes with new versions of FS or Windows. It all started in the days of Windows 95 and Windows 98. FSUIPC was a continuation of Adam Szofran's FS5IPC which was for FSW95 (FS5) and FS6IPC for FS98 (FS6). FSUIPC (U = Universal0  has worked with the same interfaces since Win98 times, through FS2000 (FS7), FS2002 (FS8) and FS2004 (FS9). Expanded, yes, but what was there already has continuity throughout.

9 hours ago, ammarmalhas said:

the "ALT" and "TAB" are different when being detected than when being assigned? Their values are interchanged? This is strange, is it not?

Not just strange, but annoying, especially at the time when I realised this difference -- too late. The interface into Windows is different -- one derives from arriving Windows message flags, the other are bits defined for a keyboard emulator. You could blame different arms of Microsoft not talking I suppose, but certainly I could have shifted the bits around internally before checking / sending them. It was too late after applications had been written to use them.

Also, for 90%+ of users it doesn't matter as both assignments to and from keypresses are more normally done using the Options dialogue, where you don't need to see the technical data in the INI file.

Pete

 

Link to comment
Share on other sites

Hi Pete,

 

I’m the original poster.

I have looked at thread below with the same/similar question posted in your forum which gives me a pretty good idea of what I need to do to get started.

 

  http://forum.simflight.com/topic/77225-keysend-over-widefs-not-working/

However, I have a problem as the ThrustMaster Cougar HOTAS is fully programmable. I normally run it in “Button and Axis” Emulation mode which basically sends out characters generated by the HOTAS microprocessor. The beauty is that I can create a downloadable profile for each aircraft generated by the Foxy compiler into the HOTAS memory for execution.

M

y problem is, the example in the link above is a normal joystick. I can convert my HOTAS into behaving like a standard joystick by taking it out of Emulation mode, but I prefer to run it in Emulation mode.

So my question is, is there a way I can assign a key press character and still to use the Key Send feature of FSUIPC4/WideFS?

 

Bill Clark

Link to comment
Share on other sites

34 minutes ago, sbclark said:

So my question is, is there a way I can assign a key press character and still to use the Key Send feature of FSUIPC4/WideFS?

Yes, any keypress OR button press can be assigned to KeySend. The nature of the actuator isn't relevant. KeySend is simply an internal code sent from FSUIPC to the Client, and the arbitrary number it contains (from 1-255) is assigned locally, at the Client, usually to a keypress there.

Pete

 

 

Link to comment
Share on other sites

Hi Pete,

Got this "KeySend" feature working...........created a profile for PMDG and setup all of my 737's, 777's and 747-400 to work with one standard setup

The only question I have, is using the comma character (,) going to create an issue for me that you can foresee?

It is one of my unused characters I assigned to this Press-to-talk feature.

Bill Clak 

Link to comment
Share on other sites

3 hours ago, sbclark said:

The only question I have, is using the comma character (,) going to create an issue for me that you can foresee?

Not unless it is or was also assigned to some other function you use. FSUIPC will be intercepting it before it gets to anything else.

Pete

 

Link to comment
Share on other sites

Pete,

One last question question. I notice that the log file in WideFS is always looking for the server IP address.

Which section do I place the following entry ServeriPaddr=xx.xx.xx.xx in the WideFS.ini file?

I have setup all my devices to use static IP addresses.

Bill Clark

Link to comment
Share on other sites

2 minutes ago, sbclark said:

One last question question. I notice that the log file in WideFS is always looking for the server IP address.

You mean you don't even have it linked up yet?

It would be automatic if your Network connection was good and both PCs are in the same Windows Workgroup. Otherwise you have to add both ServerName or ServerIPAddress AND the Protocol patameters.

All this is pointed out in the WideFS User Guide, in the part which requests you to please read it! It isn't very long!

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.