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.

XML Help needed - keypresses

Featured Replies

HiI am working on a project, in which I want a few complex aircraft controls (i.e. NAV2_RADIO_FRACT_DEC, or COM_STBY_RADIO_WHOLE_INCREASE ) to be executed on a single keypress.I was thinking about creating a gauge (or using the radio gauge itself) to "enslave" a key to execute that function, but I'm having a little trouble with it.My testing gauge for now is the nav lights gauge, to which I added a few lines after the <Mouse> event it had (that still works), but It doesn't work as it is (my guess: wrong code..ups) <Mouse> <Help ID="HELPID_GAUGE_LIGHT_SWITCH_NAV"/> <Cursor Type="Hand"/> <Click Event="TOGGLE_NAV_LIGHTS"/> </Mouse> <Keys> <On Key="m">"TOGGLE_NAV_LIGHTS"</On> </Keys></Gauge> Can someone help, please?Thank you..Ok, already found out what I did wrong with the code, and now use this: <Keys> <On Key="m">(>K:TOGGLE_NAV_LIGHTS)</On> </Keys>However, as noted on another thread, this kind of code (embeded in a gauge) only works if the panel where the gauge is placed is visible.How can I make it work independently of the panel being or not visible?(To be noted that I am using an aircraft which was not made by me - EADS Socata TB30 by Kilian Bernard)Thanks again

Add the gauge to a VCockpit section of the panel.cfg file. They load no matter the view. If you don't want it visible in the VC add a transparent version instead.Hope this helps,

Add the gauge to a VCockpit section of the panel.cfg file. They load no matter the view. If you don't want it visible in the VC add a transparent version instead.Hope this helps,
Hi Tom,I'm afraid it has nothing to do with the gauge already loaded or not.For FS9, OnKey (unlike OnEvent) only works if the panel window in which the gauge is defined, is active (2D window of VC).For FSX, it's even worse: OnEVent doesn't work either if the window isn't active.To the OP:the only way I know of to do what you want, is to define the gauge with the OnKey code, in a panel window that you keep "forced" open all the time; meaning that you have to make an invisible gauge and place that in a transparant window.To keep that window "forced" open, you have to create an XML gauge that checks the window status (and place that in a VC section); when the window is closed (eg. after view switching), open it again. All based on the windowident of that window.However, in XML there's no way to test the open/closed status of a window, so this means you have to continuously give the Panel_Id_Open event; but this induces the infamous "continuous event" problem.To solve that, you need a gauge that tests the status of a panel window; like Doug Dawson's gauge dsd_window_status.gau.Rob
  • Author

ThanksMy main problem was really to get the key to work, the other isn't so critical.Another thing: is it possible to assign a joystick key, or an axle, in the gauge XML code? If so, how can I do it?Thanks

ThanksMy main problem was really to get the key to work, the other isn't so critical.Another thing: is it possible to assign a joystick key, or an axle, in the gauge XML code? If so, how can I do it?Thanks
Not that I know of..Rob

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.