Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Best way to bind functions of Fenix/PMDG to keyboard

Featured Replies

1 hour ago, captain420 said:

Would love to see a tutorial of how to assign LVAR functions to keys using FSUIPC. I am currently using Axis and Ohs for that.

What would be an Axis and Ohs example of that?

Al

Edited by ark

  • Replies 33
  • Views 20.5k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • I'm old school. I bind very few things/ I usually just look around with my Track IR and toggle whatever function I want with the mouse. Makes it feel like flying a real aircraft to me. 

  • Just a few tips to go along with the above script by NovemberUniform for those new to using Lua scripts in FSUIPC7. -- Lua script names must be 16 characters or less (not counting the .lua file e

  • NovemberUniform
    NovemberUniform

    So, here is one solution that works good for me. I added "Nosewheel to TAXI" and "Flaps Up" for my own needs. I think it's pretty easy to understand what is going on, but there are some comments to ma

10 hours ago, bennyboy75 said:

So let’s say the Fenix - the after landing flow is landing and strobe lights off, spoiler retract, weather radar off, anti ice off (if it was on), APU start. Could this all be assigned to a button press?

So, here is one solution that works good for me. I added "Nosewheel to TAXI" and "Flaps Up" for my own needs. I think it's pretty easy to understand what is going on, but there are some comments to make it even more clear.

-- After Landing / Roll-Off Items

-- Landing Lights Retract
if not (ipc.readLvar("L:S_OH_EXT_LT_LANDING_L") == 0) or not (ipc.readLvar("L:S_OH_EXT_LT_LANDING_R") == 0) then
  ipc.writeLvar("L:S_OH_EXT_LT_LANDING_L", 0)
  ipc.writeLvar("L:S_OH_EXT_LT_LANDING_R", 0)
  ipc.writeLvar("L:S_OH_EXT_LT_LANDING_BOTH", 0)
  ipc.sleep(800)
end

-- Nosewheel Light Taxi
if not (ipc.readLvar("L:S_OH_EXT_LT_NOSE") == 1) then
  ipc.writeLvar("L:S_OH_EXT_LT_NOSE", 1)
  ipc.sleep(800)
end

-- Strobe Light Off
if not (ipc.readLvar("L:S_OH_EXT_LT_STROBE") == 0) then
  ipc.writeLvar("L:S_OH_EXT_LT_STROBE", 0)
  ipc.sleep(800)
end

-- EAI 1&2 Off
if not (ipc.readLvar("L:S_OH_PNEUMATIC_ENG1_ANTI_ICE") == 0) then
  ipc.writeLvar("L:S_OH_PNEUMATIC_ENG1_ANTI_ICE", 0)
  ipc.sleep(300)
end
if not (ipc.readLvar("L:S_OH_PNEUMATIC_ENG2_ANTI_ICE") == 0) then
  ipc.writeLvar("L:S_OH_PNEUMATIC_ENG2_ANTI_ICE", 0)
  ipc.sleep(800)
end

-- WXR SYS Off
if not (ipc.readLvar("L:S_WR_SYS") == 1) then
  ipc.writeLvar("L:S_WR_SYS", 1)
  ipc.sleep(800)
end

-- Speedbrake Retract
if not (ipc.readLvar("L:A_FC_SPEEDBRAKE") == 1) then
  ipc.writeLvar("L:A_FC_SPEEDBRAKE", 1)
  ipc.sleep(800)
end

-- Flaps Up
if not (ipc.readLvar("L:S_FC_FLAPS") == 0) then
  ipc.writeLvar("L:S_FC_FLAPS", 0)
  ipc.sleep(800)
end

-- APU Master On
if not (ipc.readLvar("L:S_OH_ELEC_APU_MASTER") == 1) then
  ipc.writeLvar("L:S_OH_ELEC_APU_MASTER", 1)
  ipc.sleep(3000)
end

-- APU Start
if (ipc.readLvar("L:S_OH_ELEC_APU_MASTER") == 1) then
  ipc.writeLvar("L:S_OH_ELEC_APU_START", 1) -- Push
  ipc.sleep(500)
  ipc.writeLvar("L:S_OH_ELEC_APU_START", 0) -- Release
end

Put the attached Lua file into your FSUIPC installation directory and assign it through the FSUIPC assignment menu to a Button or Key of your choice. Use the "Control sent" dropdown and (IMPORTANT) tick "No Repeats!", so the command only fires once per button push.

EDIT: There seemingly is no way to attach files (anymore???). You have to put the lines into a file ending with *.lua yourself. Use notepad++ or something similar.

Edited by NovemberUniform

cheers,
NiIs U.

AMD 5800X3D | 32GB DDR4 RAM @ 3200MHz | RTX 4070 12GB @ 1920x1050px

Just a few tips to go along with the above script by NovemberUniform for those new to using Lua scripts in FSUIPC7.

-- Lua script names must be 16 characters or less (not counting the .lua file extension). So for example, you could name the above script FNX_Landing_Flow.lua but that would be the max script name size as far as the number of characters to the left of the .lua is concerned. Spaces count as characters. If the name is too long, it will not show up in the controls dropdown list of Lua scripts nor in your FSUIPC7.ini file under the [LuaFiles] heading.

 

-- After adding the script to the FSUIPC7 installation directory as described above and starting the sim and FSUIPC7, when you go to look for the script in the key or button controls dropdown list, any underscores ( _ ) you used in the name will have been replaced with spaces.

- - Also, when assigning a key or button, be very careful to look for just Lua  FNX Landing Flow. I say that because there will also be entries in the controls dropdown list like LuaKill FNX Landing Flow, LuaClear FNX Landing Flow, LuaSet FNX Landing Flow, LuaToggle FNX Landing Flow, etc. If not careful it is easy to make the assignment to the wrong type of Lua control -- don't ask me how I know!  😟

Al

Edited by ark

  • 3 months later...

My procedure uses FSUIPC 6, KE-USB108 emulator and Spadext to bind a complete array of PMDG B-737-900 switches (both Saitek devices and independent toggle switches on my overhead panel) to many functions  and virtual panel knobs on the aircraft. I hate using the mouse for anything. There is no mouse on the flight deck on a Southwest B-738. The KE-USB108 emulator sends a assigned key stroke whenever a switch grounds an input on one of the I/O boards. However, Spadnext will do that too.

Below follows my procedure. It uses a rotary switch in my overhead panel to select the desired Autobrake selector setting, namely RTO. Editing comments and questions are welcome. If you have a shorter procedure to do all this, please let me know.

Download the current file Offset Mapping for PMDG 737NGX
     and 737NGXu.pdf.
from FSUIPC web site. You'll need it for step 2.

This Procedure binds a keyboard keypress to a PMDG 737 NGXu aircraft function that is switchable by a independent switch (push button, toggle or rotary) that is not part of a Saitek device or a function not listed in P3D controls list.

Needed addons: FSUIPC6 and Spadnext extended version, to be used by a flight simulator, P3D in my case.
Gary


Example ---
Bind a keyboard keypress to a PMDG function so the keypress can be made via keyboard or any keyboard emulator such as Hagstrom KE-USB 108. Activate an emulator input, that is assigned the keypress CTRL+F5, by closing any switch. The keypress CTRL+F5 is assigned to the PMDG function Autobrake (Antiskid), parameter 0 (RTO), by FSUIPC6.

1.  Check P3D Sim key assignments for any unused keypress, CTRL+F5 in this example.

2.  Document your selection: CTRL+F5 with parameter 0, which on this aircraft is Autobrake=RTO. See offset 6562
     in F:\Documents\Simulator Construction\Software Installations\FSUIPC6\Offset Mapping for PMDG 737NGX
     and 737NGXu.pdf.

3.  

4.  Open P3D with PMDG 737 NGXu aircraft selected and running.

5.  Open FSUIPC6 and select the Key Presses tab. You will now bind the keypress CTRL+F5 to Autobrake  (RTO) parameter.

6.  Click the Profile-Specific box and the name B-738 assigned to this profile will appear at the top.

7.  Click the SET button and enter CTRL+F5 into the PRESS KEY box.

8.  In the "Control sent when key pressed" box, type Autobrake or just Autob and select Autobrake Set from the dropdown menu.

9.  In the Parameter box, type a zero which corresponds to RTO, per reference in step 2 above.
     
10. Near bottom, check No Repeats box and select CONFIRM. This new assignment should now appear in the catalog in the right side. Click the OK to exit.

11. Minimize the Sim window and go to FSUIPC6 installation folder.

12. Find FSUIPC.ini file in folder, step 2 above, open it with Notepad and scroll to the bottom. Look in section [Keys] near the bottom of the list and find line 11=N116,10,1007,0      -{CTRL+F5: Press = Autobrake Set}-
This is proof you bound the keypress Ctrl+F5 to the Autobrake RTO function.
            The 11 is a key ID number
            N means no repeat
            116 means ??
            10 is the keyboard shift designator:  09 for Shift +, 10 for CTRL +   and 11 for Shift + CTRL +
            1007 is the code for the Autobrake function
             0 is the function's parameter (RTO)

13.  Close the FSUIPC6.ini file. Open Spadnext and select the Controls icon, the steering yoke.

14.  Click on the KE-USB 108 joystick in the list of controls on the left. I have a device named KE-USB108 Joystick listed with 64 unused buttons. Select button 1. Any spare button on any other device listed would be suitable also.

15.  Add a scripted event. Page title should be Button_x (Script).

16.  Add an action in the "Actions to be executed " window: Send Simulation Event.

17.  From the Provider list (upper left corner), select PMDG 737 NGXu.

18.  In the "Configure Simulation Event" window, select PMDG 737:EVT_MPM_Autobrake Selector. It should be listed under FSUIPC.

19.  Select special value "Set OFF (0)" and a Static value" of zero since it represents RTO. Click OK to close the event selection window.
 Note: For Autobrake selector OFF position, you would select "Set ON (1)" and a Static value" of one; For Autobrake selector LOW  position, you would select "Set ON (2) and a Static value" of two; and so on for all 6 settings.


20.  Add a condition to this action in the Define Condition panel, Source is Panel Autobrake Switch (FSUIPC:0000:2F80),  Comparator is "equals" and static Value is 0.
Note: Function offset in FSUIPC is hex 2F80, not decimal 1007, per Peter Dowsen's "FSUIPC Offsets - Quick Reference" table.
      

This condition asks:   If FSUIPC's Autobrake switch is set to parameter 0 (meaning RTO), then execute the following action.

22.  Click OK to close the event.

The action should now execute, pending the condition, and send a aircraft autobrake RTO event to the sim when the CRTL+F5 keyboard key is pressed or by a switch action via emulator. I use a KE-USB108 emulator and assign CTRL+F5 to an input number that is also wired to a 6-position rotary switch. Closing the switch grounds the input and issues the keypress.

The same procedure may now be repeated by adding subsequent actions for the other 5 parameters. Simply select a different keypress (CTRL+F6, CTRL+F7, etc) for each of the remaining 5 parmeter and corresponding switch positions.
     

 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.