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.

KEY_SELECT_2

Featured Replies

  • Moderator

Has anyone gotten the key_event KEY_SELECT_2, etc. to work?I'm trying to open both cockpit doors using the following, and it doesn't seem to be working. The pilot's door will open, then close again, rather than the copilot's door opening... ;(if (acft_on_grnd == 1 && chutetimer > 0 ){chutedown = 1 ;chutedeploy = 0 ;trigger_key_event (KEY_BRAKES,0) ;trigger_key_event (KEY_TOGGLE_AIRCRAFT_EXIT,0) ;trigger_key_event (KEY_SELECT_2,0);trigger_key_event (KEY_TOGGLE_AIRCRAFT_EXIT,0) ;}

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

I tried to peek on the events fired by FS when hitting the "toggle exit 1"/"toggle exit 2" sequences (SHIFT+E/SHIFT+E 2). The registered key sequence is really strange://exit 1:KEY_TOGGLE_AIRCRAFT_EXITKEY_ATC_MENU_CLOSEKEY_ATC_MENU_CLOSE//exit 2:KEY_TOGGLE_AIRCRAFT_EXITKEY_ATC_MENU_CLOSEKEY_ATC_MENU_CLOSEKEY_SELECT_2KEY_ATC_MENU_CLOSEI don't know why there are these atc keys. Maybe just some fillins?Arne Bartels

If the ATC menu is open, it will capture the Key_Select_2 command. In order for the Key_Select_2 to be useful, the ATC window must therefore be closed. I think that's why FS generates the ATC_Menu_Close command automatically.Doug

  • Moderator

Hmmm... perhaps some timing issues prompt that strangeness. In any event, it still doesn't work... ;( if (acft_on_grnd == 1 && chutetimer > 0 ) { chutedown = 1 ; chutedeploy = 0 ; trigger_key_event (KEY_BRAKES,0) ; trigger_key_event (KEY_TOGGLE_AIRCRAFT_EXIT,0) ; trigger_key_event (KEY_ATC_MENU_CLOSE,0) ; trigger_key_event (KEY_ATC_MENU_CLOSE,0) ; trigger_key_event (KEY_TOGGLE_AIRCRAFT_EXIT,0) ; trigger_key_event (KEY_ATC_MENU_CLOSE,0) ; trigger_key_event (KEY_ATC_MENU_CLOSE,0) ; trigger_key_event (KEY_SELECT_2,0) ; trigger_key_event (KEY_ATC_MENU_CLOSE,0) ; }From what the SDK indicates (which is as likely wrong as not!), is to issue the KEY_SELECT_2 prior to sending the KEY_TOGGLE_AIRCRAFT_EXIT command... ???

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Bill,I was also thinking it might be a timing issue. Can you set the gauge up to delay opening the second exit by one gauge update cycle? Who knows, it might help...Doug

Is this a C problem only, or should I expect problems in XML as well? Or could it be a problem only regarding Exits but not Engine selects? I've never tried anything with many exits, but my XML variant for selecting engines works find with the default 747 I tried it on.

  • Moderator

Karl, I honestly don't know since I quit fooling around with XML a long time ago (as far as gauges are concerned that is)...For my immediate purposes (which is to have both doors auto-open after the Cirrus SR20G2 is back on the ground after successful parachute deployment) I will simply create another animation node that's tied to the main exit (door #1) and will auto-open at the same time under those particular circumstances... ;)

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

>Is this a C problem only, or should I expect problems in XML>as well? Or could it be a problem only regarding Exits but not>Engine selects? I've never tried anything with many exits, but>my XML variant for selecting engines works find with the>default 747 I tried it on.The following works fine for me in XML:(>K:TOGGLE_AIRCRAFT_EXIT) (>K:SELECT_2)Of course, you have to make sure that there are no other gauges that are triggering K events during every update cycle.Dan

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.