Jump to content
The simFlight Network Forums

FSUIPC works only when is selected


jalil942

Recommended Posts

25 minutes ago, jalil942 said:

FSUIPC works only when he has the focus

Sorry, what do you mean?

FSUIPC "works" without focus. The only functionality that may be different when FSUIPC7 has focus compared to when MSFS has focus is in the key assignments area, and this is due to lack of support (in the MFS SDK) for various keys, and a bug in the numpad keys where they are only sent when numlock is off (when it should be when numlock is on). If thats your issue, then there are already various support requests on this issue (and this has been reported to Asobo).

For all other functionality, the focus is not important. Why do you think it is? What is your actual issue?

John

Link to comment
Share on other sites

19 minutes ago, John Dowson said:

The only functionality that may be different when FSUIPC7 has focus compared to when MSFS has focus is in the key assignments area, and this is due to lack of support (in the MFS SDK) for various keys,

that is my issue, i wonder if i can make FSUIPC and MFS both focussed in Windows

Link to comment
Share on other sites

6 minutes ago, jalil942 said:

that is my issue

But what exactly is your issue? If you can explain it rather than saying "FSUIPC works only when he has the focus" then maybe I can help.

What exactly are you trying to do/achieve?

6 minutes ago, jalil942 said:

i wonder if i can make FSUIPC and MFS both focussed in Windows

No, this is not possible and if it was it would cause many issues!

Link to comment
Share on other sites

There are various issues with receiving keys via SimConnect when MSFS has the focus. Please check the MSFS SDK documentation if you want to see what keys are working (although even in this, the numpad keys don't work!). Looking at your assignments, the ones you have to normal keys (D, E, Z, Q, T) should work - have you tried these when MSFS has the focus?

For numpad keys, MSFS only sends these when numlock is off (when it should send them when numlock is on). Please see this thread for this: 

I'm not sure why your F1-F7 aren't working - these should be ok according to the documentation. I'll take a look (when time permits), and look into it or raise with Asobo if this is an issue with MSFS.

FYI, this is the current MSFS documentation on key inputs, upon which FSUIPC7 relies to receive these from MSFS:

Quote
Key Strings group event callback
0 base Success
1 base Success
2 base Success
3 base Success
4 base Success
5 base Success
6 base Success
7 base Success
8 base Success
9 base Success
A base Success
Alt Fail Fail
B base Success
Backspace base Success
C base Success
Caps_Lock base Success
Ctrl Fail Fail
D base Success
E base Success
Enter base Success
F base Success
F1 base Success
F10 base Success
F11 base Success
F12 base Success
F2 base Success
F3 base Success
F4 base Success
F5 base Success
F6 base Success
F7 base Success
F8 base Success
F9 base Success
G base Success
H base Success
I base Success
J base Success
K base Success
L base Success
M base Success
N base Success
Num_0 base Success
Num_1 base Success
Num_2 base Success
Num_3 base Success
Num_4 base Success
Num_5 base Success
Num_6 base Success
Num_7 base Success
Num_8 base Success
Num_9 base Success
Num_Del base Success
O base Success
P base Success
Q base Success
R base Success
S base Success
Scroll_Lock Fail Fail
Shift Fail Fail
Space base Success
T base Success
Tab base Success
U base Success
V base Success
W base Success
X base Success
Y base Success
Z base Success
Sys_Req extended Skipped
Esc Problematic Skipped
F13 extended Skipped
F14 extended Skipped
F15 extended Skipped
F16 extended Skipped
F17 extended Skipped
F18 extended Skipped
F19 extended Skipped
F20 extended Skipped
F21 extended Skipped
F22 extended Skipped
F23 extended Skipped
F24 extended Skipped
Pause virtual Skipped
VK_0x00 virtual Skipped
VK_0x07 virtual Skipped
VK_0x0A virtual Skipped
VK_0x0B virtual Skipped
VK_0x0E virtual Skipped
VK_0x0F virtual Skipped
VK_0x16 virtual Skipped
VK_0x1A virtual Skipped
VK_0x3A virtual Skipped
VK_0x3B virtual Skipped
VK_0x3C virtual Skipped
VK_0x3D virtual Skipped
VK_0x3E virtual Skipped
VK_0x3F virtual Skipped
VK_0x40 virtual Skipped
VK_0x5E virtual Skipped
VK_0x88 virtual Skipped
VK_0x89 virtual Skipped
VK_0x8A virtual Skipped
VK_0x8B virtual Skipped
VK_0x8C virtual Skipped
VK_0x8D virtual Skipped
VK_0x8E virtual Skipped
VK_0x8F virtual Skipped
VK_0x97 virtual Skipped
VK_0x98 virtual Skipped
VK_0x99 virtual Skipped
VK_0x9A virtual Skipped
VK_0x9B virtual Skipped
VK_0x9C virtual Skipped
VK_0x9D virtual Skipped
VK_0x9E virtual Skipped
VK_0x9F virtual Skipped
VK_0xB8 virtual Skipped
VK_0xB9 virtual Skipped
VK_0xC1 virtual Skipped
VK_0xC2 virtual Skipped
VK_0xC3 virtual Skipped
VK_0xC4 virtual Skipped
VK_0xC5 virtual Skipped
VK_0xC6 virtual Skipped
VK_0xC7 virtual Skipped
VK_0xC8 virtual Skipped
VK_0xC9 virtual Skipped
VK_0xCA virtual Skipped
VK_0xCB virtual Skipped
VK_0xCC virtual Skipped
VK_0xCD virtual Skipped
VK_0xCE virtual Skipped
VK_0xCF virtual Skipped
VK_0xD0 virtual Skipped
VK_0xD1 virtual Skipped
VK_0xD2 virtual Skipped
VK_0xD3 virtual Skipped
VK_0xD4 virtual Skipped
VK_0xD5 virtual Skipped
VK_0xD6 virtual Skipped
VK_0xD7 virtual Skipped
VK_0xD8 virtual Skipped
VK_0xD9 virtual Skipped
VK_0xDA virtual Skipped
VK_0xDF virtual Skipped
VK_0xE0 virtual Skipped
VK_0xE8 virtual Skipped
VK_0xFF virtual Skipped
VK_ACCEPT virtual Skipped
VK_ADD virtual Skipped
VK_APPS virtual Skipped
VK_ATTN virtual Skipped
VK_BACKSLASH virtual Skipped
VK_BROWSER_BACK virtual Skipped
VK_BROWSER_FAVORITES virtual Skipped
VK_BROWSER_FORWARD virtual Skipped
VK_BROWSER_HOME virtual Skipped
VK_BROWSER_REFRESH virtual Skipped
VK_BROWSER_SEARCH virtual Skipped
VK_BROWSER_STOP virtual Skipped
VK_COMMA virtual Skipped
VK_CONVERT virtual Skipped
VK_CRSEL virtual Skipped
VK_DECIMAL virtual Skipped
VK_DIVIDE virtual Skipped
VK_EREOF virtual Skipped
VK_EXECUTE virtual Skipped
VK_EXSEL virtual Skipped
VK_FINAL virtual Skipped
VK_HELP virtual Skipped
VK_ICO_00 virtual Skipped
VK_ICO_CLEAR virtual Skipped
VK_ICO_HELP virtual Skipped
VK_JUNJA virtual Skipped
VK_KANA virtual Skipped
VK_KANJI virtual Skipped
VK_LAUNCH_APP1 virtual Skipped
VK_LAUNCH_APP2 virtual Skipped
VK_LAUNCH_MAIL virtual Skipped
VK_LAUNCH_MEDIA_SELECT virtual Skipped
VK_LBRACKET virtual Skipped
VK_LBUTTON virtual Skipped
VK_LCONTROL virtual Skipped
VK_LMENU virtual Skipped
VK_LSHIFT virtual Skipped
VK_LWIN virtual Skipped
VK_MBUTTON virtual Skipped
VK_MEDIA_NEXT_TRACK virtual Skipped
VK_MEDIA_PLAY_PAUSE virtual Skipped
VK_MEDIA_PREV_TRACK virtual Skipped
VK_MEDIA_STOP virtual Skipped
VK_MINUS virtual Skipped
VK_MODECHANGE virtual Skipped
VK_MULTIPLY virtual Skipped
VK_NONAME virtual Skipped
VK_NONCONVERT virtual Skipped
VK_NUMPAD0 virtual Skipped
VK_NUMPAD1 virtual Skipped
VK_NUMPAD2 virtual Skipped
VK_NUMPAD3 virtual Skipped
VK_NUMPAD4 virtual Skipped
VK_NUMPAD5 virtual Skipped
VK_NUMPAD6 virtual Skipped
VK_NUMPAD7 virtual Skipped
VK_NUMPAD8 virtual Skipped
VK_NUMPAD9 virtual Skipped
VK_OEM_102 virtual Skipped
VK_OEM_ATTN virtual Skipped
VK_OEM_AUTO virtual Skipped
VK_OEM_AX virtual Skipped
VK_OEM_BACKTAB virtual Skipped
VK_OEM_CLEAR virtual Skipped
VK_OEM_COPY virtual Skipped
VK_OEM_CUSEL virtual Skipped
VK_OEM_ENLW virtual Skipped
VK_OEM_FINISH virtual Skipped
VK_OEM_FJ_JISHO virtual Skipped
VK_OEM_FJ_LOYA virtual Skipped
VK_OEM_FJ_MASSHOU virtual Skipped
VK_OEM_FJ_ROYA virtual Skipped
VK_OEM_FJ_TOUROKU virtual Skipped
VK_OEM_JUMP virtual Skipped
VK_OEM_PA1 virtual Skipped
VK_OEM_PA2 virtual Skipped
VK_OEM_PA3 virtual Skipped
VK_OEM_RESET virtual Skipped
VK_OEM_WSCTRL virtual Skipped
VK_PA1 virtual Skipped
VK_PACKET virtual Skipped
VK_PAUSE virtual Skipped
VK_PERIOD virtual Skipped
VK_PLAY virtual Skipped
VK_PLUS virtual Skipped
VK_PRINT virtual Skipped
VK_PROCESSKEY virtual Skipped
VK_QUOTE virtual Skipped
VK_RBRACKET virtual Skipped
VK_RBUTTON virtual Skipped
VK_RCONTROL virtual Skipped
VK_RMENU virtual Skipped
VK_RSHIFT virtual Skipped
VK_RWIN virtual Skipped
VK_SCROLL virtual Skipped
VK_SELECT virtual Skipped
VK_SEMICOLON virtual Skipped
VK_SEPARATOR virtual Skipped
VK_SLASH virtual Skipped
VK_SLEEP virtual Skipped
VK_SUBTRACT virtual Skipped
VK_TILDE virtual Skipped
VK_VOLUME_DOWN virtual Skipped
VK_VOLUME_MUTE virtual Skipped
VK_VOLUME_UP virtual Skipped
VK_XBUTTON1 virtual Skipped
VK_XBUTTON2 virtual Skipped
VK_ZOOM virtual Skipped

 

Link to comment
Share on other sites

1 hour ago, John Dowson said:

I'm not sure why your F1-F7 aren't working - these should be ok according to the documentation. I'll take a look (when time permits), and look into it or raise with Asobo if this is an issue with MSFS.

I've just checked these and they should be fine. Are these assignments working for you when MSFS has the focus? They should work when both MSFS has the focus, and when FSUIPC7 has the focus (but not when neither have the focus). If not, enable logging for Buttons & Keys, then press those keys when MSFS has the focus and send me the log and I'll take a look.

John

Link to comment
Share on other sites

The log is a continuation log and shows nothing. Please send me a full log, do not start a new one.

You also seem to be getting a lot of FUEL SELECTOR events for whatever aircraft you loaded. These aren't of interest - you can add this line to the [General] section of your FSUIPC7.ini to prevent these being logged:
    DontLogThese=65962,66523

Press some keys when FSUIPC7 has the focus first, then switch focus to MSFS and press some other keys. Try standard letters initially, to see if you are getting anything at all.

Link to comment
Share on other sites

  • 1 month later...
9 minutes ago, emilio said:

I have the same problem, if I have focused the Fsuipc7 windows, the console log show the key pressed, and works in FS2020, but if I have focused in FS2020 Windows the console received nothing. 

What keys are you using? When MSFS has the focus, only key input events seen by SimConnect will be recognised. For example, try pressing the standard letter keys - are you saying that FSUIPC7 doesn't see those when MSFS has the focus?

Link to comment
Share on other sites

Yes, I have tried with standard keys and multiples keys, always works if focus is in FSUIP Window.

 

Paste an example:

[Keys]
1=70,10,66288,0     -{ctl+F: Press=TOGGLE_FLIGHT_DIRECTOR }-
2=118,8,65603,0     -{F7: Press=FLAPS_DOWN }-
5=76,8,65751,0     -{L: Press=LANDING_LIGHTS_TOGGLE }-

 

 

Link to comment
Share on other sites

3 minutes ago, emilio said:

Yes, I have tried with standard keys and multiples keys, always works if focus is in FSUIP Window.

Those keys are recognised. Could you activate logging for Buttons & Keys, press each of those key assignments and then show me your log.
This is what I see pressing those keys when MSFS has the focus (with no assignments to them):
L:

Quote

  3109704 EV_KEYDOWN received: 0x4C (L)
  3109704 KEYDOWN: VK=76, Waiting=0, Repeat=N, Shifts=0
  3109704 .. KeyDown received from FS but not programmed 
  3109813 EV_KEYUP received: 0x4C (L)
  3109813 KEYUP: VK=76, Waiting=0, Shifts=0
  3109813 .. KeyUp received from FS but not programmed

F7 (here I held the key down a bit longer and so a second repeat keypress was detected):

Quote

  3136391 EV_KEYDOWN received: 0x46 (F)
  3136391 KEYDOWN: VK=70, Waiting=0, Repeat=N, Shifts=2
  3136391 .. KeyDown received from FS but not programmed 
  3136485 EV_KEYDOWN received: 0x46 (F): repeat set
  3136485 KEYDOWN: VK=70, Waiting=0, Repeat=Y, Shifts=2
  3136485 .. KeyDown received from FS but not programmed 
  3136579 EV_KEYUP received: 0x46 (F)
  3136579 KEYUP: VK=70, Waiting=0, Shifts=2
  3136579 .. KeyUp received from FS but not programmed
 

Ctl + F:

Quote

  3145563 EV_KEYDOWN received: 0x76 (v)
  3145563 KEYDOWN: VK=118, Waiting=0, Repeat=N, Shifts=0
  3145563 .. KeyDown received from FS but not programmed 
  3145672 EV_KEYUP received: 0x76 (v)
  3145672 KEYUP: VK=118, Waiting=0, Shifts=0
  3145672 .. KeyUp received from FS but not programmed
 

Please attach you full log (not extracts or a continuation) and your FSUIPC7.ini.

John

Link to comment
Share on other sites

2 minutes ago, emilio said:

FSUIPC recognize the keys and works perfect but if I lose the focus in FSUIPC windows, the console log not show events and FS2020 not receive.

To receive keyboard input, either FSUIPC7 or MSFS must have the focus.
As I have said, please show me your log file when MSFS has the focus, as you have said that the keys aren't being seen for this.
The log file you attached shows the keys being seen and the controls being sent (but I have no idea which app had the focus when you did this).

Keyboard input will NOT BE SEEN if neither MSFS nor FSUIPC7 has the focus - the input will go to the app with focus, there is no way to receive such input.

John

 

Link to comment
Share on other sites

2 minutes ago, emilio said:

I'm using a SCPascal Script to communicate SISMO MCP to FSUIPC and sendkey function to a FS2020 windows, I have change to FSUIPC Windows and works perfect.

So you are using the FSUIPC SDK to send keys? Or are you using the windows SendKey function?
I am confused now about your support requests in this topic. Do you require assistance or not? What are you trying to do?

Your previous posts were (or seemed) to be about not seeing key presses when MSFS has the focus, and now you are talking about sending key presses.

If you require any further support, can you please clarify what you are trying to do and what your issues is.

Thanks,

John 

Link to comment
Share on other sites

Hi John.

Finally, I can send keys or changes values of offset to MSFS. So for this problem I don't need assistance.  But I can detect changes on MSFS, I try to explain my case:

- I have MCP/EFIS from SISMO Solutions

- I'm trying to rewrite the scripts to communicate from MCP to MSFS using FSUIPC

- Scripts using SC-Pascal

Actually I can send changes from hardware to FSUIPC and to MSFS, so I can connect to FSUIPC correctly, and I can read offset from FSUIPC/MSFS, but there is a function "OnFSUIPCChange" that detect if an offset change in MSFS and read the change, so I can send this change to MCP. But is not working, the scripts is not detecting the changes, anyway in the FSUIPC Console show the changes, so I think it's not a problem with FSUIPC.

Maybe you could give me a clue.

Thanks in advance.

Emilio

Link to comment
Share on other sites

Hi Emilio,

14 hours ago, emilio said:

Actually I can send changes from hardware to FSUIPC and to MSFS, so I can connect to FSUIPC correctly, and I can read offset from FSUIPC/MSFS, but there is a function "OnFSUIPCChange" that detect if an offset change in MSFS and read the change, so I can send this change to MCP. But is not working, the scripts is not detecting the changes, anyway in the FSUIPC Console show the changes, so I think it's not a problem with FSUIPC.

Sorry, I have no idea. Is the 'OnFSUIPCChange' function from the the SC-Pascal SDK? If that is the function that isn't working as expected, you need to contact the author of that for assistance.

John

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.