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.

Keyboard Input in C Gauge

Featured Replies

Hi,I need a way to read keyboard input in my C gauge. I managed to do this with DirectInput, but the problem is that Flightsim receives the key too. So if I need key 'L' my gauge reacts but FS switches the light on or off.Is there a way to block the keys, so they don't get through to the FS? Just like all the FMC do :)

Well, you can intercept the keyboard completely, but this is complex.An easy solution would be to un-assign that key in FS. A better solution would be to use the registered version of FSUIPC to handle your key assignment needs as it will allow you to have them only handled by FSUIPC if you so desire.

Well, I need all keys (text input) so unassign is not an option.But I would be interested in the "intercept" method. It doesn't matter if it's complex.

>Well, I need all keys (text input) so unassign is not an>option.Not sure what you mean. If your gauge uses the "L" key, then go into FS's Settings Assignments dialog and unassign it from the panel lights. Now FS sees it, but does nothing.>But I would be interested in the "intercept" method. It>doesn't matter if it's complex.Well, see the problem is that your gauge is a .dll running under FS, so your gauge is a part of FS. So the best way to do this without writting your own IPC or module would be to use FSUIPC.The only other thing I could think of would be to intercept the Windows Messages before they get to FS (like what FSUIPC can do), and this would require you to use WIN32 API stuff. You'd have to create your own message handling loop, intercept and handle all windows messages, dispatching ones you aren't interested in to FS's handler, and processing the ones you are looking to use.So, to do this, you'll need to start on MSDN with learning about windows messages and dispatching.Good luck.

>Not sure what you mean. If your gauge uses the "L" key, then>go into FS's Settings Assignments dialog and unassign it from>the panel lights. Now FS sees it, but does nothing.My gauge needs all keys while the keyboard input is active. Just like most of the payware FMC do. First you click on a button, and then every key goes into the FMC instead of the FS. Then you click the button again and keyboard input is disabled, so FS can use the keys again.

One possibility: use a XML gauge with a section, switch the locking of the keyboard with ... (M:Key) chr ....Or use unused key combination e.g. AltGr+Key.

  • Commercial Member

>sd18gau.zip. ATM I can't remember who supplied me with the>original information but it's in there, along with an>acknowledgement.>>-Dai>FYI, your example doesn't compile with the current DirectX version.

Ed Wilson

Mindstar Aviation
My Playland - I69

>sd18gau.zip. ATM I can't remember who supplied me with the>original information but it's in there, along with an>acknowledgement.>>-DaiDai, good to see you're still around!!! That would have been me in conjunction with Arne B. who got me started on this keyboard stuff. Can't help however concerning the non-compilation in more modern environments than my old but trusted VC++6.0

I already use your code, but the document clearly states:"I have to sound a note of caution though; if you

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.