Jump to content
The simFlight Network Forums

KeyPress Recognition Probem


Recommended Posts

I have a couple of custom KeyPresses programmed for FSX (e.g. Autopilot Off) in FSUIPC. I am using TH2GO on one graphic port and a single screen on the other. I drag the GPS to the single screen when flying. If I click on the single screen (e.g. button on the GPS) the custom KeyPresses are no longer recognized by FSUIPC.....However, if I click on any of the 3 TH2GO screens the custom keypresses are recognized. It is as if the KeyPress part of FSUIPC is turned off when I click on the GPS screen which is on the 4th screen but it turns back on as soon as I click on one of the the 3 TH2GO Screens. I can reproduce this 100% of the time. Is there something I have set up improperly?

Stiletto2

Link to comment
Share on other sites

I have a couple of custom KeyPresses programmed for FSX (e.g. Autopilot Off) in FSUIPC. I am using TH2GO on one graphic port and a single screen on the other. I drag the GPS to the single screen when flying. If I click on the single screen (e.g. button on the GPS) the custom KeyPresses are no longer recognized by FSUIPC.....However, if I click on any of the 3 TH2GO screens the custom keypresses are recognized. It is as if the KeyPress part of FSUIPC is turned off when I click on the GPS screen which is on the 4th screen but it turns back on as soon as I click on one of the the 3 TH2GO Screens. I can reproduce this 100% of the time. Is there something I have set up improperly?

All FSUIPC can do for keypresses is trap them when they arrive in the main FS Windows message processing routine. It sounds like the GPS is capturing them first. However, it should certainly pass on any it doesn't use. Alternatively maybe the GPS is acting like a separate process and uses its own Windows processing when it has the focus. This is likely for GPS's and FMC's where they need to capture all of the alphanumeric keys for waypoint and airport identity entry. I don't see any reason why it is dependent on where you put things on multiple screens, however.

Regards

Pete

Link to comment
Share on other sites

All FSUIPC can do for keypresses is trap them when they arrive in the main FS Windows message processing routine. It sounds like the GPS is capturing them first. However, it should certainly pass on any it doesn't use. Alternatively maybe the GPS is acting like a separate process and uses its own Windows processing when it has the focus. This is likely for GPS's and FMC's where they need to capture all of the alphanumeric keys for waypoint and airport identity entry. I don't see any reason why it is dependent on where you put things on multiple screens, however.

Regards

Pete

Hi Pete,

Thanks for the reply. I may have confused things a bit by mentioning the GPS. This problem exists even if I don't drag the GPS to the 4th screen so therefore has nothing to do with the GPS. All I have to do is click on the blank 4th screen and FSUIPC Key Presses apparently doesn't see any keyboard activity or at least doesn't generate the proper FSX command until I click on one of the 3 TH2GO screens and try the same key combination. After some additional testing, it is important that I mention that I run FSX in Full Screen mode. The problem does not exist in Windowed Mode. I should also mention that the Couatl (DreamTeam) addon does see the key strokes. It is only the FSUIPC Key Presses addon that does not see the key strokes when I am in Full Screen mode and click on the screen that does not contain the main FSX display. Best as I can tell, for the problem to appear, one has to be using FSUIPC Key Presses and be running in full screen and be using an extra screen to drag things like the GPS display into where you would click on it.

Stiletto2

Link to comment
Share on other sites

All I have to do is click on the blank 4th screen and FSUIPC Key Presses apparently doesn't see any keyboard activity ...

Sounds like FS then no longer has the focus. FS won't see any keypresses either -- if FS sees them, so does FSUIPC, as that's how it gets them, through FS. For normal keypresses to reach a Windows program it must have the keyboard focus.

... it is important that I mention that I run FSX in Full Screen mode.

Aha! Certainly nothing outside the "full screen" owned by FS is going to provide keyboard focus for FS.

The problem does not exist in Windowed Mode. I should also mention that the Couatl (DreamTeam) addon does see the key strokes.

It might be using raw keyboard mode or Windows hotkeys. Neither of those methods needs the focus.

Regards

Pete

Link to comment
Share on other sites

Sounds like FS then no longer has the focus. FS won't see any keypresses either -- if FS sees them, so does FSUIPC, as that's how it gets them, through FS. For normal keypresses to reach a Windows program it must have the keyboard focus.

Hi Pete,

Interesting......actually FS does see the keyboard keypresses (e.g. "z" for autopilot on/off) when I have clicked on the 4th screen which I believe is still inside the Full Screen purview of FS. However, FS does not see the custom control output for keypresses that are custom programed in FSUIPC in the same situation. That would tell me that FSUIPC is seeing the keypress but unable to output the custom control to FSX in this situation...don't know why.

Stiletto2

Link to comment
Share on other sites

Interesting......actually FS does see the keyboard keypresses (e.g. "z" for autopilot on/off) when I have clicked on the 4th screen which I believe is still inside the Full Screen purview of FS.

In that case, so must FSUIPC -- unless the specific keypresses you are using have been intercepted by some other add-on.

You can enable button and keypress logging in FSUIPC's options to see what is going on.

However, FS does not see the custom control output for keypresses that are custom programed in FSUIPC in the same situation. That would tell me that FSUIPC is seeing the keypress but unable to output the custom control to FSX in this situation...don't know why.

Custom controls? What are they? Perhaps you could be more specific.

Regards

Pete

Link to comment
Share on other sites

In that case, so must FSUIPC -- unless the specific keypresses you are using have been intercepted by some other add-on.

You can enable button and keypress logging in FSUIPC's options to see what is going on.

Custom controls? What are they? Perhaps you could be more specific.

Regards

Pete

Hi Pete,

Sorry about the term "custom controls". All I meant to talk about was that a KeyPress that was programmed in FSUIPC sends a "control".

The logging feature is great. Debugging used to be one of my greatest talents when I was in the computer business. The logging tells me beyond a shadow of a doubt that when I am clicked on screen 4 (in Full Screen mode), FSUIPC does not see the keystrokes.,.....however, FSX does!!!!!

I simply used the "z" key, and followed a written sequence between clicking on the main screens and clicking on screen 4...whenever I clicked on screen 4, FSUIPC did not see the subsequent keystrokes until I clicked on the main screens again (so this isn't even an issue of what's programmed in the Key Press section- though that is when the problem is noticed). However, while I was clicked on screen 4, the AP light on the plane's cockpipt console continued to go on and off as I would depress the "z" key on and off (thus verifying that FSX was seeing the keystrokes) even though the FSUIPC log did not record those keystrokes!.

This problem could be quite anoying for flyers who use full screen mode and drag their GPS to another screen.....to them it would seem like FSUIPC intermittently recognizes the programmed keypresses (they wouldn't remember when they last clicked on the GPS or on the main screen). Any chance FSUIPC can be modified to still see the keystrokes after mouse clicking on the extra screen (while in full screen mode) just like FSX does?

Thanks for all of your time in responding to this issue.

Stiletto2

Link to comment
Share on other sites

The logging tells me beyond a shadow of a doubt that when I am clicked on screen 4 (in Full Screen mode), FSUIPC does not see the keystrokes.,.....however, FSX does!!!!!

Hmm. I cannot explain that. FSUIPC subclasses the "FS98MAIN" window -- the windows message processing WndProc in FS -- and traps WM_KEYDOWN and WM_KEYUP messages to determine if they are user assigned. The log should show those. If not then they are being taken out by something else subclassing ahead (i.e. subclass added after) FSUIPC's. But to do that you'd think that whatever it is had a use for those keypresses, so it would still make no sense if they did nothing.

I simply used the "z" key, and followed a written sequence between clicking on the main screens and clicking on screen 4...whenever I clicked on screen 4, FSUIPC did not see the subsequent keystrokes until I clicked on the main screens again (so this isn't even an issue of what's programmed in the Key Press section- though that is when the problem is noticed). However, while I was clicked on screen 4, the AP light on the plane's cockpipt console continued to go on and off as I would depress the "z" key on and off (thus verifying that FSX was seeing the keystrokes) even though the FSUIPC log did not record those keystrokes!.

I can only think that there must be some sort of focus change and an alternative WndProc activated to handle the messages. I find that difficult to believe, as it would be so weird. The FS98MAIN WndProc is the control centre for everything in FS. All parts of FS send controls (as WM_COMMAND messages) through that routine -- that's how FSUIPC monitors Events too. (Does the FSUIPC event logging show the control sent by 'z'?)

Any chance FSUIPC can be modified to still see the keystrokes after mouse clicking on the extra screen (while in full screen mode) just like FSX does?

How? Where does it get them from?

Is it only the GPS? What about other child windows (undocked FS windows)? They are all treated in the same way as far as I know. No one has reported this problem before in the four years of FSX. In fact as far as I know most folks can't get undocked windows on a separate screen in FS full screen mode. I have two different multi-screen installations and I certainly cannot do it -- as soon as I switch to full screen mode any undocked windows disappear -- screens unused by FS go blank.

Regards

Pete

Link to comment
Share on other sites

(Does the FSUIPC event logging show the control sent by 'z'?)

No. It is as if I never depressed the "z" at all.

Is it only the GPS? What about other child windows (undocked FS windows)? They are all treated in the same way as far as I know. No one has reported this problem before in the four years of FSX. In fact as far as I know most folks can't get undocked windows on a separate screen in FS full screen mode. I have two different multi-screen installations and I certainly cannot do it -- as soon as I switch to full screen mode any undocked windows disappear -- screens unused by FS go blank.

I am using Windows 7 Ultimate. It is important to note that the screen set up at Desktop is using "extened disiplays" so that my desktop is all 4 screens (3 through TH2GO into one graphics port and 1 screen in the 2nd graphics port). I can move my mouse through all 4 screens.

I didn't even use the GPS for one of the tests so it doesn't have a lot to do with the GPS other than that is what casues me to click on the 4th screen. There was no undocking of windows (that only is done when running FSX in a windowed mode operation). Once I am in Full Screen mode when flying, the 4th screen is blank. And since I can move my mouse through all 4 screens, I did the test simply by clicking on the main screens (with the scenery on it) and then alternatively clicking on the blank 4th screen. I also tested with the GPS. In order to get the GPS into the 4th screen, while in Full Screen mode and flying, I opened View...Instrument Panel....and selected GPS. The GPS screen then pops up on the main flying screens. At that point I simply drag it down to the 4th screen since it is one continuous desktop. There is no "undock option". At that point, I get the same test results even if I only click on the GPS face when doing the 4th screen clicking. You should be able to recreate this as I know of many flyers who drag the GPS screen to another screen.

As far as it never having been reported before, it would require someone using the extra screen for a clickable display (e.g. GPS) and using the FSUIPC KeyPress option and not clicking on the main screen very often. I use Project Magenta on a separate computer and GoFlight modules so I don't do a lot of clicking on the main screen. Otherwise the pilot would be clicking back on the main screen so often (radios etc.) that they might only rarely use a FSUIPC KeyPress after clicking on the GPS and before clicking on the main screens again. That really narrows down the field. For those people left their experience might be that they would notice that the FSUIPC Key Presses would not always work but wouldn't know why. It was just luck that I stumbled onto the fact that it was because I had clicked on the 4th screen and not yet clicked again on the main screens. Or maybe there is some other reason.

Stiletto2

Link to comment
Share on other sites

No. It is as if I never depressed the "z" at all.

Hmmm ... that means it is not only bypassing the usual WM_COMMAND route via the FS98MAIN window, but also the SimConnect control monitoring facility.

I think you've uncovered another bag of worms inside FSX. I'm really very unlikely to be able to resolve that, not unless I can repro it here which so far I cannot.

I am using Windows 7 Ultimate. It is important to note that the screen set up at Desktop is using "extened disiplays" so that my desktop is all 4 screens (3 through TH2GO into one graphics port and 1 screen in the 2nd graphics port). I can move my mouse through all 4 screens.

Same here except only two screens and no TH2G.

At that point I simply drag it down to the 4th screen since it is one continuous desktop.

There's something about TH2G that is changing things there, then. I do have a TH2G on an XP machine, but a full screen FSX on that occupies all screens -- I don't understand how you have a screen free if it is all one continuous desktop. The full screen FS should occupy all of them, surely? That's what it means to be "full screen".

Regards

Pete

Link to comment
Share on other sites

Hmmm ... that means it is not only bypassing the usual WM_COMMAND route via the FS98MAIN window, but also the SimConnect control monitoring facility.

I think you've uncovered another bag of worms inside FSX. I'm really very unlikely to be able to resolve that, not unless I can repro it here which so far I cannot.

Same here except only two screens and no TH2G.

There's something about TH2G that is changing things there, then. I do have a TH2G on an XP machine, but a full screen FSX on that occupies all screens -- I don't understand how you have a screen free if it is all one continuous desktop. The full screen FS should occupy all of them, surely? That's what it means to be "full screen".

Regards

Pete

Hi Pete,

I think I am just saying it wrong. My system should be a lot like your 2 screen system except my 1st screen stretches across 3 screens. I think of it as a single desktop since my mouse can go across all but the 3 screens (TH2GO) are the ones that have the taskbar across the bottom. The 4th screen just has the wallpaper showing. W7 Screen Resolution shows the 3 screens as one single large screen -- Display Number 1 and the 4th screen as Display number 2. Display Number 1 is set as my main display. FSX also records them as Display number 1 and Display number 2. When I run FSX in full screen mode it only shows on Display Number 1 leaving Display Number 2 blank. It is when I am clicked on Display number 2 (from a Windows logical perspective) that FSUIPC doesn't see the keyboards strokes. Your 2 screen system could be used the same way with screen 1 showing FSX in full screen and screen 2 blank....then you should be able to test the GPS drag down and/or clicking on display 2.

Stiletto2

Link to comment
Share on other sites

Your 2 screen system could be used the same way with screen 1 showing FSX in full screen and screen 2 blank....then you should be able to test the GPS drag down and/or clicking on display 2.

So far i can't make it do that. I suspect it may be to do with video drivers, maybe the video cards themselves. What drivers and card(s) are you using?

Note that a lot of the messages I've read in assorted forums also seem to suggest that using 2nd screens in full screen mode doesn't work with FSX -- though it did, and quite well, with FS9. I suspect you've just hit on some combination which does work.

Regards

Pete

Link to comment
Share on other sites

I am using NVidia GTX 285 ....I think the driver is fairly old but works for me...driver number: 196.21

On my system with two screens I'm using a GTX 280 with even older drivers I think -- 190.56.

I'll try again when I get time, or I might update my drivers. It's my development and testing PC. My real flying PC only drives a projector and a 10 foot wide screen. ;-). That uses a GTX 480 and very very recent drivers.

Regards

Pete

Link to comment
Share on other sites

On my system with two screens I'm using a GTX 280 with even older drivers I think -- 190.56.

I'll try again when I get time, or I might update my drivers. It's my development and testing PC. My real flying PC only drives a projector and a 10 foot wide screen. ;-). That uses a GTX 480 and very very recent drivers.

Regards

Pete

Ooh ....a 10 foot wide screen with a GTX 480....sounds nice. I will check back now and then to see if you have had a chance to find out anything more on this little problem.

Thanks for all of your interest and attention.

Stiletto2

Link to comment
Share on other sites

I will check back now and then to see if you have had a chance to find out anything more on this little problem.

It might take a while. I don't know what I've done, but in trying to repro the problem I've got my dev system in a state where neither FSX nor ESP (separate installations on the same PC) will go into full screen mode without crashing! Must be something to do with drivers I guess as there's been nothing added or changed in my ESP install. They are both fine in the normal Windowed mode which I have to use for development (with loads of other Windows to keep tabs on).

I'm pretty busy with other stuff for FSUIPC at present, so I can't really start messing with my sdev system to sort this out. I'll try and get to it when I'm on top of these other developments but it may be a couple of weeks or more.

If you've not heard about it by the end of November, remind me in case it's got lost under a mound of other stuff!

Regards

Pete

Link to comment
Share on other sites

It might take a while. I don't know what I've done, but in trying to repro the problem I've got my dev system in a state where neither FSX nor ESP (separate installations on the same PC) will go into full screen mode without crashing! Must be something to do with drivers I guess as there's been nothing added or changed in my ESP install. They are both fine in the normal Windowed mode which I have to use for development (with loads of other Windows to keep tabs on).

I'm pretty busy with other stuff for FSUIPC at present, so I can't really start messing with my sdev system to sort this out. I'll try and get to it when I'm on top of these other developments but it may be a couple of weeks or more.

If you've not heard about it by the end of November, remind me in case it's got lost under a mound of other stuff!

Regards

Pete

Hi Pete,

Ok, no problem.

Stiletto2

Link to comment
Share on other sites

  • 1 month later...

Just bumping this as you requested to see if you are able to pursue this little problem further at this time. Let me know.

Ask me a again in a week. Tied up this week. My main difficulty is that on the only PC I have with two screens not using Matrox TripleHead2Go to make it look like one screen, FSX simply won't run in full screen mode -- crashes every time. So I can't test it at all at present. Next week I'll have to think about moving a screen to another PC, or maybe my laptop.

Pete

Link to comment
Share on other sites

Ask me a again in a week. Tied up this week. My main difficulty is that on the only PC I have with two screens not using Matrox TripleHead2Go to make it look like one screen, FSX simply won't run in full screen mode -- crashes every time. So I can't test it at all at present. Next week I'll have to think about moving a screen to another PC, or maybe my laptop.

Pete

Ok, no problem.

Thanks.

Stiletto2

Link to comment
Share on other sites

  • 2 weeks later...

This is a reminder as requested. If you would like, I can back burner this until mid-January...let me know.

I didn't forget. I've got my Notebook set up ready for a test this week, and a "spare" Monitor I can plug in for a second screen. I just hope FS doesn't crash when I switch to full screen mode -- that is what is happening on my normal test PC where I have all my debugging tools. Something to do with video drivers I guess, but I've not been able to fix it.

Yes, if i don't get back before the end of next week, remind me in January. But I hope to try somerthing tomorrow or Friday.

Pete

Link to comment
Share on other sites

I didn't forget. I've got my Notebook set up ready for a test this week, and a "spare" Monitor I can plug in for a second screen. I just hope FS doesn't crash when I switch to full screen mode -- that is what is happening on my normal test PC where I have all my debugging tools. Something to do with video drivers I guess, but I've not been able to fix it.

Yes, if i don't get back before the end of next week, remind me in January. But I hope to try somerthing tomorrow or Friday.

Pete

Ok, sounds good.

Stiletto2

Link to comment
Share on other sites

But I hope to try somerthing tomorrow or Friday.

Okay. I've been all day on this. It wasn't easy because all the tools i use to debug things are hidden and inaccessible in full screen mode, and when you return to Windowed mode the things I wanted to watch don't apply, of course.

The good news is that I can reproduce it, and, sort of, can see what is happening. The bad news is that nothing I can think of to work around it works

It looks like FS uses a completely different window class for the 'other screen', one called "FS2K6DeviceWnd". It's used for the screen as a whole, a DEVICE more than a WINDOW.

The window procedure associated with that class receives the keypresses, and i would presume it passes them on directly, so bypassing my interception. I've tried sub-classing that Windows procedure so I can get first crack at the key-presses, but there's some mechanism being used that defeats it.

I've tried forcing the subclassing to repeat, to get my interception in first, but that doesn't work.

Sorry, but I'm out of ideas. I can't do anything about it I'm afraid. I guess that device windows, whatever they are, are a different kettle of fish and don't really do 'subclassing'.

Regards

Pete

Link to comment
Share on other sites

I too run a Triple Head to Go driving three screens for the outside view. I also have two more monitors for instruments that I drag to often. I also run in Full Screen mode. I drive the triple head to go with a GTX 470 and use a GTX 460 for the two instrument monitors. I use the Nvidia control software to make one of the two instrument monitors the main display, the display that will have the windows task bar and desktop.

I have used key-presses via FSUIPC to interface a Relaity XP GNS530 via FSUIPC that I run on the non-triple head monitors. The system is working quite well.

Let me know if I can help.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • 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.