Jump to content
The simFlight Network Forums

FSUIPC 7 only works when the FSUIPC window is active.


lovrozs

Recommended Posts

I want to use my own Airbus MCDU with Flybywire Airbus. I have managed to set all the buttons, however they only work when the FSUIPC window is on top and active, if it is not active and just running in the background they do not work. I tried several variations but could not figure out what the problem was. Unfortunately, I couldn't find a similar problem in the topics, so I opened a new one.

Best regards

Zsolt

Link to comment
Share on other sites

8 hours ago, lovrozs said:

I have managed to set all the buttons, however they only work when the FSUIPC window is on top and active, if it is not active and just running in the background they do not work.

This occurs for XInput devices, such as the Xbox One and Xbox 360 controllers. Are you using one of these, or another XInput-type device?
FSUIPC will only get input from such devices when it has the focus.
To get around this, you can use a free conversion utility called XInput Plus. From the FSUIPC7 README.txt file:

Quote

XINPUT devices, such as the XBox One and XBox 360 controllers do not wotk natively with FSUIPC7.
If you want to use FSUIPC7 with such devices, you will need to install and configure a conversion utility called XInput Plus.
Please see the following tutorial:
    https://www.play-old-pc-games.com/compatibility-tools/xinput-plus-tutorial/
It has been reported that the UI for this utility is also now available in English.
Also note that you need to point this utility to the FSUIPC7.exe, not the MSFS.exe.
 

John

Link to comment
Share on other sites

11 hours ago, lovrozs said:

Unfortunately I could not solve the problem. My USB keyscard is not a joystick controller

I suspect that the software being used with your "keyscard" is only sending keystrokes to the Window with current focus, instead of actually emulating a real keyboard. This would mean that FSUIPC doesn't see the keypresses. It's a result of FSUIPC7 having to be a separate process to MSFS. With previous versions of FS, and P3D, FSUIPC is part of the sim process and so can see the Windows keypress messages.

If it is recognised as a HID device ("Human Input Device") then it might be possible to use a Lua plug-in to FSUIPC which opens the device as a HID and interprets the signals arriving. This would be instead of using the driver supplied with it.

Possibly OpenCockpits support can help you? Have you checked? Do they have a support forum?

Pete

 

Link to comment
Share on other sites

Hi Pete,

- FSUIPC 7 recognises the key strokes, I have all the MCDU pushbuttons set up and can use them perfectly, the problem is that the FSUIPC 7 window must be active. If it's not active, just running in the background, it doesn't detect the key presses. If I click on the FSUIPC window, it works perfectly again. 

- I have written to OpenCockpits before, but unfortunately they have not replied. They don't have a support forum, you can only send them a message. The product description states that it is compatible with FSUIPC. It is possible that it is not compatible with version 7, but that is not stated.

- When I plug in the Keyscard Windows 11 sees it as two devices:
1.  HID compatible, manufacturer defined device
2. USB input device

-Unfortunately editing the Lua Plug-in is beyond my knowledge, I'll have to read up on it. Could you help me with how to get started?

 

Zsolt

Link to comment
Share on other sites

8 hours ago, lovrozs said:

FSUIPC 7 recognises the key strokes, I have all the MCDU pushbuttons set up and can use them perfectly, the problem is that the FSUIPC 7 window must be active. If it's not active, just running in the background, it doesn't detect the key presses.

Yes, as I said.

8 hours ago, lovrozs said:

The product description states that it is compatible with FSUIPC. It is possible that it is not compatible with version 7, but that is not stated.

Yes, FSUIPC7 is very different as it isn't part of the FS/P3D process.

8 hours ago, lovrozs said:

When I plug in the Keyscard Windows 11 sees it as two devices:
1.  HID compatible, manufacturer defined device

In that case you could probably solve it with a Lua plug-in. But it might mean some experimentation and logging to deduce the binary encoding being used. It would involve some programming job for sure. You'd start by just opening it as a HID device, reading whatever data it supplied and logging it. Then seeing what gets logged for each keypress.

Pete

 

Link to comment
Share on other sites

Keystrokes sent to MSFS (when that has the focus) should be forwarded to FSUIPC7 via SimConnect, so FSUIPC7 should also receive keystrokes when MSFS has the focus. If this is not happening, it could be that you are using keystrokes not accepted by SimConnect - not all key strikes are propogated. What key strokes are you using?

On 12/19/2021 at 12:25 AM, lovrozs said:

My USB keyscard is not a joystick controller, so Xinput Plus cannot be used. Any other ideas?

But it must be a HID joystick type device if you are assigning to it in FSUIPC, as FSUIPC only recognises such device types for direct assignments.
Are you sure it is not an XINPUT type device? Maybe you can show/attach your FSUIPC7.log and FSUIPC7.ini files.

John

Link to comment
Share on other sites

  • 2 weeks later...
13 hours ago, lovrozs said:

2. Is it possible that windows 11 is causing the problem? If I have time I will try it with windows 10 too.

I doubt it, but maybe check on windows 10 if possible.

Looking at your assignments, many are using multiple modifiers, e,g,

112=123,15,32907,0 	-{alt+lctl+lshift+F12: Press=:MobiFlight.A320_Neo_CDU_1_BTN_R }-

I am wondering of this may be the issue...
Could you please activate logging in FSUIPC for Buttons and Keypresses as well as for Events, and then generate another FSUIPC7.log file where you load your aircraft and then, when MSFS has the focus, press some of your assigned key combinations - try the following:
     6 - should trigger a MobiFlight.A320_Neo_CDU_1_BTN_L3 event
     lshift+P - should trigger a MobiFlight.A320_Neo_CDU_1_BTN_L1 event
     alt+lctl+lshift+H - should also trigger a MobiFlight.A320_Neo_CDU_1_BTN_L1 event

Then exit and show me the FSUIPC7.log file.

Thanks,

John

Link to comment
Share on other sites

Hi John,

- Since you wrote that you see multiple modifiers in the .ini file, so I also created a new setting where I only used simple numbers and letters or SHIFT + number or SHIFT + letter or SCHIFT + characters combinations. Then with these new settings I configured the MCDU L1,L2,L3,L4,L5,L6 and R1,R2,R3,R4,R5,R6 buttons in FSUIPC. I send you two .log files. In the first one, the FSUIPC window is in the foreground for each L and R button press, in the second one, FSUIPC is running only in the background when the buttons are pressed. 

- It is clear from the second file that FSUIPC does not detect key presses when not in focus.

- For the Keyscard, I need to use the Encoder_Keys.exe software, which does the encoding. This program detects and displays keystrokes even when not in focus.

- I also tried running FSUIPC and Encoder_keys in administrator mode, but that didn't solve the problem. I tried running them both in compatible mode, but that didn't work either.

Zsolt

FIRST FSUIPC7.log SECOND FSUIPC7.log

FSUIPC7.ini

Link to comment
Share on other sites

13 hours ago, lovrozs said:

- It is clear from the second file that FSUIPC does not detect key presses when not in focus.

This is true - FSUIPC7 does not detect key presses when it dies not have the focus. It can only detect key presses 
   - when FSUIPC7 has the focus
   - by receiving the key press as an Input event via SimConnect

The issue seems to be that MSFS is not detecting these "key presses" and so not forwarding them to interested 3rd party clients, such as FSUIPC7.

Have you tried with an actual keyboard - you should see that it works when using a keyboard and MSFS (or FSUIPC7) has the focus.

13 hours ago, lovrozs said:

- For the Keyscard, I need to use the Encoder_Keys.exe software, which does the encoding. This program detects and displays keystrokes even when not in focus.

So this software does the encoding and then forwards to the current windows application that has the focus?
Can MSFS see the input from this device as key strokes? If it can, it should forward them to FSUIPC7 via SimConnect. However, if MSFS does not see these as key strokes then they will not be forwarded to 3rd party apps. 

Link to comment
Share on other sites

Hi John,

I understand what you wrote. Thank you for taking the time to address the issue.

So the encoder_keys.exe software is a keyboard emulator that is shipped with the hardware. The hardware can emulate 88 keys. The encoder_keys application reads from an .ini file which character or key combination is assigned to which key. If the encoder_keys software is running (whether in the foreground or in the background.), I can type it into the Windows text editor or browser search engine with the MCDU key, what I built. However, if I (for example) assign the character "0" in the control options in MSFS to change the external/internal view, pressing the "0" key on my USB keyboard changes the view, but pressing the key programmed for the MCDU "0" key does not change the view. So MSFS does not detect the emulated key in the Controller settings. I tried it now in Prepar3d V5, it works there. Prepar3d recognizes my MCDU keyboard without the FSUIPC.  Unfortunately I don't have FSUIPC version 6.
The interesting thing is that Opencockpits built this hardware into their MCDU, and I have seen others User use the same hardware to control the MCDU in MSFS, for example in YouTube videos. That is why I chose this controller. I could have built it with Arduino, but in that case I would have needed two cards. If I fail to solve this problem, I will rebuild the MCDU for Arduino control. 

By the way, I wrote again to Opencockpits support, unfortunately they don't reply as fast as you did. 

Best Regards

Zsolt

Link to comment
Share on other sites

Hi Zsolt,

11 hours ago, lovrozs said:

So MSFS does not detect the emulated key in the Controller settings.

This is the issue. If MSFS doesn't recognise the input as keyboard unput, it won't be forwarded to 3rd party clients. Does MSFS maybe recognise it as another (assignable) device?

You can also try to see if FSUIPC recognises your device as a HID type device without running the encoder_keys.exe software. If it is recognised directly (i.e. as a joystick type device), you may be able to assign the MCDU buttons directly  to the custom controls.  Otherwise you could  try using lua. If you want to try this, first verify that the MCDU buttons can be recognised - you can do this using the HiDScanner software, available from here: 

 

John

Link to comment
Share on other sites

  • 2 weeks later...

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.