Jump to content
The simFlight Network Forums

MSFS Key assignment


Christian Glaeser

Recommended Posts

Dear support,

I need help setting up my keybinds with my new FSUIPC7 license. I would like to try and use some CRJ switches. The switches in the list do not work and I suppose I need to get the Hex of the control. Could you maybe tell me how or show me a tutorial? Have been searching for one but without success.

Thank you in advance,

Christian

Link to comment
Share on other sites

9 hours ago, Christian Glaeser said:

I would like to try and use some CRJ switches.

Which switches?

9 hours ago, Christian Glaeser said:

The switches in the list do not work and I suppose I need to get the Hex of the control.

What list? What "Hex of the control" - sorry, I don't understand.

To assign a button or key to control a switch, first see if there is a "control" to operate that switch. The controls are the items displayed in the assignments drop-down menu. There is also a text document created (in your Documents\FSUIPC7 folder) called  Controls List for MSFS Build 999. Also, if you activate logging for Events and toggle the switch in the UI, the event (or control) that the switch uses will be logged, and you can try assigning to that. Note you can 'Open Console' (also available from the log window) to see the events logged directly as you activate them.

If no standard controls/events are available, you can look to see if there are any lvars available to control these switches. To do this, use the Add-ons -> WASM -> List Lvars menu option (you must have your aircraft loaded and ready to fly). If you see any that look like they might be what you need, you can try changing their value (using the WASM->Set Lvar... menu option). Once you have identified an lvar that works, you can then assign to this. There are three ways to do this:
    - by creating a macro file
    - by writing a short lua script
    - by trying the latest FSUIPCv7.2.0 beta which has a new facility to add lvars to offsets.

The first two options are described in the user guide. For the third option, see 

 

9 hours ago, Christian Glaeser said:

I also have a problem setting up spoilers, i'm not sure if i just set the axis up wrong but it doesn't react

I can't really help if you do not provide any relevant information. Which aircraft are you using? What did you assign to? Is this assigned to an axis or to buttons/keys?
If you want further help with this, I will need to at least see your FSUIPC7.ini and FSUIPC7.log files, and a description of what you are trying to achieve and what you have tried.

  • Thanks 1
Link to comment
Share on other sites

First off all,

Thank you for the fast response.

8 hours ago, John Dowson said:

Which switches?

I want to set up the taxi and landing light switches in the CRJ, the standard controls do not work.

8 hours ago, John Dowson said:

What list? What "Hex of the control" - sorry, I don't understand.

Capture.PNG.65f35d6bf0b5fb091f17a8bb96e7625e.PNG

8 hours ago, John Dowson said:

- by trying the latest FSUIPCv7.2.0 beta which has a new facility to add lvars to offsets.

Could you send me a link for dowload

10 hours ago, John Dowson said:

Add-ons -> WASM -> List Lvars menu option

How do you get the WASM, dont see it

Thank you in advance,

Christian Glaeser

Link to comment
Share on other sites

I responded to this yesterday but all my posts from yesterday seem to have gone missing...

On 5/22/2021 at 10:19 PM, Christian Glaeser said:
On 5/22/2021 at 11:40 AM, John Dowson said:

What list? What "Hex of the control" - sorry, I don't understand.

Capture.PNG.65f35d6bf0b5fb091f17a8bb96e7625e.PNG

Ok, they are custom controls. If there are custom controls available for your aircraft, you will have to consult the documentation for the aircraft, or ask on the CRJ forums if any are available. Custom controls are provided by the add-on, of available, so you need to check the add-on documentation. I don't have the CRJ, sorry.

On 5/22/2021 at 10:19 PM, Christian Glaeser said:

Could you send me a link for dowload

Betas are posted in the Announcements forum - see: 

 

On 5/22/2021 at 10:19 PM, Christian Glaeser said:

How do you get the WASM, dont see it

If you don't see the WASM menu under the Add-ins menu, you are either using a version earlier than 7.1.0, or you didn't select to install the WASM, or there was an issue installing the WASM. Anyway, download the latest beta from that link above and try that.

For taxi and landing lights, try:
    ASCRJ_OVHD_TAXI_SWITCH
    ASCRJ_OVHD_LDG_LEFT_SWITCH
    ASCRJ_OVHD_LDG_NOSE_SWITCH
    ASCRJ_OVHD_LDG_RIGHT_SWITCH

 

John

Link to comment
Share on other sites

Thank you for the help, when it chose "ASCRJ_OVHD_LDG_NOSE 857" and set the value to 1 it turns on and 0 set it to off. This is great.

But now I only need to understand how to set my switch from my HOTAS to activate these switches or change there values. Could you maybe explane?

Thank you for all the great help,

Christian

Link to comment
Share on other sites

9 hours ago, Christian Glaeser said:

But now I only need to understand how to set my switch from my HOTAS to activate these switches or change there values. Could you maybe explane?

There are 3 ways to do this:
    1. create a macro file to to either set or toggle the lvar, and assign a button or switch to this lvar macro. Ecactly how you do this depends on how your buttin/switch works.
    2. write a short lua script to activate the lvar, and assign your button to the lua script. Or you could use event.button in your lua script, and skip the assignment completely.
    3. Add the lvar ro an offset, and then assign your button/switch to toggle or set the lvar via the offset

3 may be the easiest. However, adding lvars to offsets is only available in the latest 7.2.0 beta, so please download and install this, from 

 

Then, you need to create add an [LvarOffsets] section, or an [LvarOffsets.<profileName>] section, specifying the lvar you want to use, together with the offset to hold the value together with the size of the offset, e.g as the following (although better to use a profile]:

[LvarOffsets]
1=L:ASCRJ_OVHD_LDG_NOSE=UB0xA000

This will add the lvar ASCRJ_OVHD_LDG_NOSE  to offset A000 as an unsigned byte, for both reading and writing, i.e. you can read that offset to read the lvar value, and setting that offset will update the lvar value.

Then, to assign to  a button or switch, go into the FSUIPC7 Buttons & Switched assignments panel, press/switch your button, and then assign to the control Offset Byte Togglebits, giving A000 as the offset, and x1. as the parameter. That button will then toggle the lvar value.
Depending on if using a button or switch, you could assign to Offset Byte Set with a parameter of 1 for press and 0 for release (for example, if using a switch, maybe also with an offset condition to keep the switch in-sync.). The actual way you assign depends on what you are assigning to and how the button/switch works.

Link to comment
Share on other sites

That is my .ini file of FSUIPC7,

[...]

[WAPI]
EnableWAPI=Yes

[Profile.General]
1=CRJ700ER Lufthansa Regional D-ACSB

[LvarOffsets.General]
1=L:ASCRJ_OVHD_LDG_NOSE=UB0xA000
0=L:ASCRJ_OVHD_LDG_NOSE=UB0xA001
1=L:ASCRJ_OVHD_LDG_LEFT=UB0xA002
0=L:ASCRJ_OVHD_LDG_LEFT=UB0xA003
1=L:ASCRJ_OVHD_LDG_RIGHT=UB0xA004
0=L:ASCRJ_OVHD_LDG_RIGHT=UB0xA005

but when I enter UB0xA000 or xA000 and press ok it just disappears.

Capture.PNG.bc1e4fa348ff273b680a14d9cf796865.PNG

 

Link to comment
Share on other sites

2 hours ago, Christian Glaeser said:

but when I enter UB0xA000 or xA000 and press ok it just disappears.

Offset controls are NOT "custom controls", but are actually listed for selection in the drop down list, with all the other named controls, as Offset ... Please do READ what you are told. We are really trying to help, but you do need to read what we say. Here's what John said:

7 hours ago, John Dowson said:

assign to the control Offset Byte Togglebits, giving A000 as the offset

So, scroll to that control in the list (or just enter "o" to get there faster).  The offset entry field will be there when you select that control, but I think for the offset in hexadecimal (as A000 is) I think you may need to enter it as xA000.

Pete

 

 

Link to comment
Share on other sites

7 hours ago, Christian Glaeser said:

[LvarOffsets.General]
1=L:ASCRJ_OVHD_LDG_NOSE=UB0xA000
0=L:ASCRJ_OVHD_LDG_NOSE=UB0xA001
1=L:ASCRJ_OVHD_LDG_LEFT=UB0xA002
0=L:ASCRJ_OVHD_LDG_LEFT=UB0xA003
1=L:ASCRJ_OVHD_LDG_RIGHT=UB0xA004
0=L:ASCRJ_OVHD_LDG_RIGHT=UB0xA005

Please realize that this is invalid. The first number is the index number, which must be unique. And why are you adding the same lvar to different offsets.
I think you are misunderstanding how lvars to offsets work.... Try with this:

Quote

[LvarOffsets.General]
1=L:ASCRJ_OVHD_LDG_NOSE=UB0xA000
2=L:ASCRJ_OVHD_LDG_LEFT=UB0xA001
3=L:ASCRJ_OVHD_LDG_RIGHT=UB0xA002

i.e. each lvar in its own offset. Then assign your buttons to those offsets as previously described.  

 

 

 

Link to comment
Share on other sites

Good news,

I finally got it thanks to your help. I'm really sorry for not having properly read your text and misunderstanding it. I thank you for all your patience and hard work. Thank you for this great product.

I also wanted to ask if I could toggle multiple Lvar offsets with one button or if i need to make a macro or Lua file
Sincerely,

Christian

  • Like 1
Link to comment
Share on other sites

1 hour ago, Christian Glaeser said:

I also wanted to ask if I could toggle multiple Lvar offsets with one button or if i need to make a macro or Lua file

You can do this as you would for any multiple assignment to a button. First assign your button for the first control and click 'Ok' to save this assignment. Then open your FSUIPC7.ini file in an editor and located the line for that assignment just added - it will be the last entry in either your [Buttons] section or [Buttons.<profileName>] section, depending upon whether or not you are using profiles. Now comment that line out by inserting a semi-colon ';' character after the index number of the entry and save that change. You can then open the Button & Switches assignment panel again and click 'Reload all buttons'. You can then assign your second action to that button. Repeat if you want to add further actions. Once all have been added, you can remove the semi-colons previously added to uncomment those entries, save the file and agaiin 'Reload all buttons'.  You will then have multiple actions assigned to that button -  the Button assignment panel will only show one entry and it will be grayed-out, indicating it cannot be changed via the UI (you have to edit the ini to adjust/remove when you have multiple assignments to a single button or key.

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.