Jump to content
The simFlight Network Forums

Keys Only Repeating If FSUIPC7 Has Focus?


NovemberUniform

Recommended Posts

Hi there,

I want to bind some FCU rotary knobs of the newly released Fenix A320 to keys of my keyboard. For example, I want to decrease the ALT while holding the "9-key" (not Numpad) and I want to increase the ALT while holding the "0-key" (again not Numpad).

For that, I created custom presets of the appropriate LVars in the myevents.txt. Then I assigned the keys with the FSUIPC Key Assignment, choosing my custom presets from the drop down. So far so good.

My ALT is increasing and decreasing only by one increment, if the keys are pressed, but the keys are somehow not repeated, if I keep the keys pressed. I found out, this only works, if the FSUIPC window has the focus, which it naturally has not, while simming as usual. The sim window has the focus. I tried different key of the keyboard, not just numbers, but it didn't change the situation.

I tried the same presets assigned to buttons of my controllers. Here the button press is repeated while held, even if the sim has the focus and the FSUIPC window is in the background.

Is there a way to achieve what I want with repeating key presses, or is this a limitation of the sim SDK?

 

Thank you very much!

Nils

 

Link to comment
Share on other sites

Can you share your setting?

I've made something similar on the B247D to drive oil shutter and carb heat, and I did not use myevent.txt, but only declared [LVaroffsets] and [Buttons] sections in FSUIPC7.ini

It's working well and has no link with window focus.

[Buttons.B247D]
0=CR(-F,6)F,4,Cx2100A001,x0000000A 	-{offset ubyte decrement, offset A001 (Decr=10, Limit=0)}-
1=CR(-F,6)F,4,Cx2100A002,x0000000A 	-{offset ubyte decrement, offset A002 (Decr=10, Limit=0)}-
2=CR(-F,6)F,5,Cx1100A001,x0064000A 	-{offset ubyte increment, offset A001 (Incr=10, Limit=100)}-
3=CR(-F,6)F,5,Cx1100A002,x0064000A 	-{offset ubyte increment, offset A002 (Incr=10, Limit=100)}-
4=CR(+F,6)F,4,Cx1100A003,x0064000A 	-{offset ubyte increment, offset A003 (Incr=10, Limit=100)}-
5=CR(+F,6)F,4,Cx1100A004,x0064000A 	-{offset ubyte increment, offset A004 (Incr=10, Limit=100)}-
6=CR(+F,6)F,5,Cx2100A003,x0000000A 	-{offset ubyte decrement, offset A003 (Decr=10, Limit=0)}-
7=CR(+F,6)F,5,Cx2100A004,x0000000A 	-{offset ubyte decrement, offset A004 (Decr=10, Limit=0)}-

[LvarOffsets.B247D]
1=L:LEVER OIL SHUTTER 1=UBA001
2=L:LEVER OIL SHUTTER 2=UBA002
3=L:LEVER CARBURETOR HEAT 1=UBA003
4=L:LEVER CARBURETOR HEAT 2=UBA004
5=L:ENG THROTTLE 1=UB0xA010
6=L:ENG THROTTLE 2=UB0xA011
7=L:ENG MIXTURE 1=UB0xA012
8=L:ENG MIXTURE 2=UB0xA013
9=L:ENG PROPELLER 1=UB0xA014
10=L:ENG PROPELLER 2=UB0xA015

 

Link to comment
Share on other sites

11 hours ago, NovemberUniform said:

My ALT is increasing and decreasing only by one increment, if the keys are pressed, but the keys are somehow not repeated, if I keep the keys pressed. I found out, this only works, if the FSUIPC window has the focus, which it naturally has not, while simming as usual. The sim window has the focus. I tried different key of the keyboard, not just numbers, but it didn't change the situation.

So repeat isn't working when MSFS has the focus? I will check this.

11 hours ago, NovemberUniform said:

Is there a way to achieve what I want with repeating key presses, or is this a limitation of the sim SDK?

Key repeats should be sent to the sim. There were some changes to processing key assignments and sending keys in the latest release (v7.3.4). I'm pretty sure this was working in earlier versions, so I will look into it...

40 minutes ago, roland_lfor said:

[Buttons] sections in FSUIPC7.ini

It's working well and has no link with window focus.

The OP's problem is with key repeats - button repeats are working as expected.

John

Link to comment
Share on other sites

1 minute ago, John Dowson said:

So repeat isn't working when MSFS has the focus? I will check this.

Correct. Thanks for checking, John. 

2 minutes ago, John Dowson said:

The OP's problem is with key repeats - button repeats are working as expected.

Indeed. Thanks anyway Roland. 

Link to comment
Share on other sites

Yes, that's the correct LVar. I do it like this in the myevents.txt

// FENIX A32X
FNX32X_FCU_SPD_DECR# (L:E_FCU_SPEED, 1) -- (>L:E_FCU_SPEED)
FNX32X_FCU_SPD_INCR# (L:E_FCU_SPEED, 1) ++ (>L:E_FCU_SPEED)
FNX32X_FCU_HDG_DECR# (L:E_FCU_HEADING, 1) -- (>L:E_FCU_HEADING)
FNX32X_FCU_HDG_INCR# (L:E_FCU_HEADING, 1) ++ (>L:E_FCU_HEADING)
FNX32X_FCU_ALT_DECR# (L:E_FCU_ALTITUDE, 1) -- (>L:E_FCU_ALTITUDE)
FNX32X_FCU_ALT_INCR# (L:E_FCU_ALTITUDE, 1) ++ (>L:E_FCU_ALTITUDE)
FNX32X_FCU_VS_DECR# (L:E_FCU_VS, 1) -- (>L:E_FCU_VS)
FNX32X_FCU_VS_INCR# (L:E_FCU_VS, 1) ++ (>L:E_FCU_VS)

I don't have to specify a format in this case and it works.

I just found out there is a database also including presets for the Fenix over at Hubhop by Mobiflight. That's handy. If only I knew where to read about the syntax of these calculator codes for presets. They can be very powerful it seems.

  • Like 1
Link to comment
Share on other sites

10 hours ago, NovemberUniform said:

Yes, that's the correct LVar. I do it like this in the myevents.txt

// FENIX A32X
FNX32X_FCU_SPD_DECR# (L:E_FCU_SPEED, 1) -- (>L:E_FCU_SPEED)
FNX32X_FCU_SPD_INCR# (L:E_FCU_SPEED, 1) ++ (>L:E_FCU_SPEED)
FNX32X_FCU_HDG_DECR# (L:E_FCU_HEADING, 1) -- (>L:E_FCU_HEADING)
FNX32X_FCU_HDG_INCR# (L:E_FCU_HEADING, 1) ++ (>L:E_FCU_HEADING)
FNX32X_FCU_ALT_DECR# (L:E_FCU_ALTITUDE, 1) -- (>L:E_FCU_ALTITUDE)
FNX32X_FCU_ALT_INCR# (L:E_FCU_ALTITUDE, 1) ++ (>L:E_FCU_ALTITUDE)
FNX32X_FCU_VS_DECR# (L:E_FCU_VS, 1) -- (>L:E_FCU_VS)
FNX32X_FCU_VS_INCR# (L:E_FCU_VS, 1) ++ (>L:E_FCU_VS)

I don't have to specify a format in this case and it works.

I just found out there is a database also including presets for the Fenix over at Hubhop by Mobiflight. That's handy. If only I knew where to read about the syntax of these calculator codes for presets. They can be very powerful it seems.

Hi 

is it possible if you can share file of Fenix A320 Presets that you have as I am struggling with my Honeycomb bravo autopilot mappings as well as if you have something that bravo rotaries can work as well

thank you

Sehadi

Link to comment
Share on other sites

Hello Sehadi, 

what you quoted is all I can share at the moment. I haven't looked much further, as I ran into troubles with using keys. That's what this topic is about.

17 hours ago, NovemberUniform said:

I just found out there is a database also including presets for the Fenix over at Hubhop by Mobiflight.

You can look there. Just google it.

Link to comment
Share on other sites

@NovemberUniform I have looked into the key repeat issue...I don't think this has ever been working properly in FSUIPC7! The problem is that only the initial key press is received from the FS - no repeats are received, and later the key release. I've checked in 7.3.3 and repeats were not working in that version, and I doubt that they were in any previous version. It is strange that this issue has not been reported previously...

I have added some code to enable repeat key presses to be detected. Basically I generate these internally and send repeat key presses until the key release is received.
In the attached version, I have set repeats to be send every 50ms. I can adjust this (if needed), or maybe add a new ini parameter so that this can be set/changed by the user.
What do you think?
Anyway, please try the attached version, v7.3.5a. I can adjust the repeat rate, or make this adjustable, as you prefer. Let me know.

FSUIPC7.exe

John

Link to comment
Share on other sites

4 minutes ago, John Dowson said:

I can adjust the repeat rate, or make this adjustable, as you prefer. Let me know.

Or maybe better to wait 250ms (for example) for the first key repeat, and then 50ms for subsequent repeats? I think it is necessary to have a longer repeat interval for the first repeat as this will affect all current key assignments (when 'no repeats' has not been selected). This is implemented in the attached version, v7.3.5b: FSUIPC7.exe

John

Link to comment
Share on other sites

2 hours ago, John Dowson said:

I can adjust the repeat rate, or make this adjustable, as you prefer. Let me know.

Hi John, 

I can confirm the repeat does now work with hidden FSUIPC window. Good job and thanks very much! 

If the repeat rate would be adjustable (ini), that would give all the options. For my taste, with the Fenix A320, 50ms is slightly too fast.

Related question: I have UseProfiles = Files enabled. Could I have a repeat rate specifically for each profile? That would be extra useful. 

Link to comment
Share on other sites

1 hour ago, NovemberUniform said:

If the repeat rate would be adjustable (ini), that would give all the options. For my taste, with the Fenix A320, 50ms is slightly too fast.

Yes, I also think 50ms is probably too fast. I will make the default 100ms, and stick with 250ms for the first repeat. I will make both of these adjustable via ini parameters.

1 hour ago, NovemberUniform said:

I have UseProfiles = Files enabled. Could I have a repeat rate specifically for each profile? That would be extra useful. 

I think I can make both of these parameters profile specific, but whether you use profiles in separate files or not wouldn't make a difference.

 

Link to comment
Share on other sites

13 hours ago, NovemberUniform said:

Hello Sehadi, 

what you quoted is all I can share at the moment. I haven't looked much further, as I ran into troubles with using keys. That's what this topic is about.

You can look there. Just google it.

Thanks for reply. 

I am reading this topic altogether and I tried Hubhop as well infect downloaded mobiflight software as well as connector and text file including all the lvars in there but i dont know how to go further i saw videos but tbh i don't understand much where to start and what to do next.

Link to comment
Share on other sites

1 minute ago, sehadi said:

I am reading this topic altogether and I tried Hubhop as well infect downloaded mobiflight software as well as connector and text file including all the lvars in there but i dont know how to go further i saw videos but tbh i don't understand much where to start and what to do next.

You don't need to download or use MobiFlight connector to use lvars/hvars/presets with FSUIPC7 - it comes with the MF presets.
But I do not know what your issue is, and it certainly isn't related to this topic. Please create a new topic and describe your issue.

However, if it is related to using MF presets, please first make sure that you have enabled the WASM module and have read about the WASM and how to use presets - you can find this information in the Advanced User manual, starting on page 46.

Also, before requesting support, check that you are using the latest version which is v7.3.4.

John

Link to comment
Share on other sites

20 hours ago, John Dowson said:

I think I can make both of these parameters profile specific

@NovemberUniform The attached version accepts two new ini parameters:
    InitialKeyRepeatRate - default value of 250ms
    SubsequentKeyRepeatRate - default value of 100ms

These ini parameters go in the [Keys] or profile-specific [Keys.xxx] sections.

FSUIPC7.exe

John

 

  • Like 1
Link to comment
Share on other sites

Just now, NovemberUniform said:

much appreciated. It will take me a few days, maybe a week, until I can test it myself. I don't have access to my computer til then. 

No problem. However, there was a bug in the previous version I posted related to the use of the esc key - the key press was received but no key release (as the FS goes into the menu and stops sending data), which caused the esc key press to repeat indefinitely. This has now also been fixed.

Link to comment
Share on other sites

Hi all...

Just wanted to add to this thread... I was having the exact issue as described in the thread title, and after reading, hoped the "repeating key" fix might work. Unfortunately, the latest version on the site (7.3.5) doesn't seem to resolve it. Is this still a work in progress?

In addition, I noticed that I don't even seem to be getting an initial shift, not just no repeating.

To clarify, I have set two buttons on an xbox controller (I know, not ideal, but it's my "portable" joystick setup 😉) to control throttle up (small) and throttle down (small). If the FSUIPC menu is focused, all controls work as expected, but there's the menu box on screen. If I minimize it and refocus MSFS, all FSUIPC assigned buttons no longer work (but MSFS configured buttons do).

I'll gladly clarify if you need specific tests.

 

Thanks in advance!

Link to comment
Share on other sites

7 hours ago, robnewman76 said:

I was having the exact issue as described in the thread title,
...
To clarify, I have set two buttons on an xbox controller...

Then your issue has nothing to do with the issue of this thread - this thread is about key press assignments not repeating - the xbox controller has no keys, but you can send key presses on buttons, which is completely different (i.e. it is a button assignment issue, not a key assignment issue).

For your issue, I suggest you read the README.txt file that comes in the zip file:

Quote

Limitations
===========
...
XINPUT devices, such as the XBox One and XBox 360 controllers do not work 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

Thanks John!

I guess my haste to get things up and running I skipped some info 😄...

All sorted now, thanks. After your explanation, I actually realized that I could use a program I already have and use can ReWASD, so I just set the button to emulate a key press, then set the key presses to a sim function in FSUIPC.

Thanks again... You've made my Fenix playable on the road 🙂

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.