Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hallo

Ich verwende Microsoft Visual Studio Community 2022 (64-Bit) - Current Version 17.5.4 und C#

Ich programmiere IFly737 Tastaturkombinationen auf mein Arduino Schalterpanel.

Bei SendModifierKeys funktionieren Control und Shift jedoch alles mit Alt nicht.

Wo liegt mein Fehler?

 

MfG Dirk

Posted

Hi Dirk,

If you are using MSFS, the ALT key is not supported in FSUIPC7. 

It does work with FSX and P3D. If you are using either of those simulators, please show your code.

Paul

Posted

Hallo,

Das ist für Prepar3d V5.3.

Mit Tastatur ausgelöst Control Alt 2 / im Log steht  >

  1069078 KEYDOWN: VK=17, Waiting=0, Repeat=Y, Shifts=2
  1069078 .. Key not programmed -- passed on to FS
  1069109 KEYDOWN: VK=18, Waiting=0, Repeat=N, Shifts=6
  1069109 .. Key not programmed -- passed on to FS
  1069625 KEYDOWN: VK=18, Waiting=0, Repeat=Y, Shifts=6
  1069640 .. Key not programmed -- passed on to FS
  1069672 KEYDOWN: VK=50, Waiting=0, Repeat=N, Shifts=6
  1069672 .. Key not programmed -- passed on to FS
  1069875 KEYUP: VK=50, Waiting=0, Shifts=6
  1070078 KEYUP: VK=18, Waiting=0, Shifts=2
  1070156 KEYUP: VK=17, Waiting=0, Shifts=0

Flugsimulator reagiert korrekt.

 

mit C#

FSUIPCConnection.SendKeyToFS(Keys.D1, SendModifierKeys.Control | SendModifierKeys.Alt);

im Log steht  >

   867593 FSUIPC Control Action: Ctrl=1070, Param=4658
   867593 SendKeyToFS(00030032=[alt+ctl+2], KEYDOWN) ctr=0
   867593 Sending WM_KEYDOWN, Key=17 (Control) (Scan code 29), Ctr=6
   867593 Sending WM_KEYDOWN, Key=18 (Alt) (Scan code 56), Ctr=6
   867609 Sending WM_KEYDOWN, Key=50 (Scan code 3), Ctr=4
   867625 Sending WM_KEYUP, Key=50 (Scan code 3), Ctr=3
   867640 KEYDOWN: VK=17, Waiting=0, Repeat=N, Shifts=2
   867640 .. Key not programmed -- passed on to FS
   867640 KEYDOWN: VK=18, Waiting=0, Repeat=N, Shifts=6
   867640 .. Key not programmed -- passed on to FS
   867640 KEYDOWN: VK=50, Waiting=0, Repeat=N, Shifts=6
   867640 .. Key not programmed -- passed on to FS
   867640 KEYUP: VK=50, Waiting=0, Shifts=6
   867640 Sending WM_KEYUP, Key=18 (Alt) (Scan code 56), Ctr=2
   867640 Sending WM_KEYUP, Key=17 (Control) (Scan code 29), Ctr=2
   867640 WRITE0[20096]  7B91,   1 bytes: 01                                               .
   867672 KEYUP: VK=18, Waiting=0, Shifts=2
   867672 KEYUP: VK=17, Waiting=0, Shifts=0

Flugsimulator reagiert nicht.

 

Posted

Your C# code shows Keys.D1. Did you paste the wrong line? The log shows you sent the 2 key...

   867593 FSUIPC Control Action: Ctrl=1070, Param=4658
   867593 SendKeyToFS(00030032=[alt+ctl+2], KEYDOWN) ctr=0

I'm assuming you are calling 

FSUIPCConnection.SendKeyToFS(Keys.D2, SendModifierKeys.Control | SendModifierKeys.Alt);

You can see from the log (in bold above) that my DLL has passed on the correct key code to FSUIPC.

@John DowsonMight be able to tell you why this key combination is working from the keyboard but not through the IPC interface.

Paul

Posted

The log shows the keys alt+ctl+2 being sent to the FS (both key presses and releases) and also being received back by FSUIPC. Is this key combination assigned in P3D, or in other software? The key combination is only sent to the FS. And it us never a good idea to use the alt key as a modifier, as this has a special meaning in windows for menu operation, which is why it was removed in FSUIPC7.

 

Posted

Hallo, 

genau ich habe die falsche Zeile Kopiert.

Wenn Alt derartige Probleme macht, dann mache ich die letzten Tasten 

mit Control und Shift.

Danke für die Info.

MfG Dirk

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.