With a little educated guessing, I found the answer to my
question: "How to trap Shifted/Controlled keystrokes in
XML"
I discovered, that instead of using:
<On Key="Z">...</On>
FS also accepts
<On Key="90">...</On>
with '90' being the Windows keycode for the 'Z' key.
Now, since keycodes are ranging from 0-255, I wondered how MS
would internally store the value for shift/control sequences.
I took an educated guess, by adding multiples of 256 to the
keycode; and behold: IT WORKED !!
Iow:
- <On Key="90">...</On> traps "Z"
- <On Key="346">...</On> traps "Shift-Z" 256 + 90 = 346
- <On Key="602">...</On> traps "Control-Z" 512 + 90 = 602
- <On Key="858">...</On> traps "Shift-Control-Z" 768 + 90 = 858
FYI: A list of all Windows keycodes can o.a. be found in
Peter Dowson's FSUIPC Userguide. An extract of that info is
attached to this post..
---------------------------------------------------------------------------------------------------
<!-- Crtl plus Key Left arrow 512 plus 37 -->
<On Key="549">
(>K:VOR1_OBI_DEC,degree)
</On>
<!-- Crtl plus Key Right arrow 512 plus 39-->
<On Key="551">
(>K:VOR1_OBI_INC,degree)
</On>
---------------------------------------------------------------------------------------------------
<On Event="AXIS_ELEVATOR_SET">
(L:Flight Controls Press Avail, bool) !
if{
(L:Elevator Deflection, percent) 163.83 /-/ * (>K:ELEVATOR_SET)
}
els{
(A:Elevator Position, percent) (>L:Elevator Deflection, percent)
}
</On>
Will let you move the elevators free as long as you have hyd press.
When you have none, it freezes in the last known position.
This is a basic example, but indeed very powerful.
-------------------------------------------------------------------------------------------------
<Keys>
<On Key="AlphaNumeric">
<Visible>10 19 (C:fs9gps:enteringInput) rng 31
(C:fs9gps:enteringInput) == or</Visible>
(M:Key) chr (>C:fs9gps:IcaoSearchEnterChar) @InitBlinker
</On>
<On Key="Ascii">
<Visible>110 119 (C:fs9gps:enteringInput) rng 131
(C:fs9gps:enteringInput) == or</Visible>
(M:Key) chr (>C:fs9gps:NameSearchEnterChar) @InitBlinker
</On>
<On Key="Backspace">
<Visible>(C:fs9gps:enteringInput)</Visible>
10 19 (C:fs9gps:enteringInput) rng 31
(C:fs9gps:enteringInput) ==
||
if{
-1 (>C:fs9gps:IcaoSearchBackupChar) @InitBlinker quit
}
110 119 (C:fs9gps:enteringInput) rng 131
(C:fs9gps:enteringInput) ==
||
if{
-1 (>C:fs9gps:NameSearchBackupChar) @InitBlinker quit
}
</On>
</Keys>
--------------------------------------------------------------------------------------------------------
I tested this one and it works, only full screen.
Panel, ID-400, always visible.
<Keys>
<On Event="VIEW_MODE">
400 (>K

ANEL_ID_OPEN)
</On>
<On Event="VIEW_MODE_REV">
400 (>K

ANEL_ID_OPEN)
</On>
</Keys>