In LMC.LUA Line 50
commands2[192]='sim/view/still_spot' -- 192 is vkey code of '`'
and then line 52
commands2[string.byte('1')]='SRS/X-Camera/Select_View_ID_1'
Is it safe to assume that you can either use the key code or the string.byte(" ` ") interchangeably?
The second question is what is in line 50 what is the sim/view doing?
Key Identifiers
Re: Key Identifiers
string.byte return ASCII code of the character - better for readability. The 192 means I just wrote the code directly, probably copying from debug log. I have this value as key in Lua table and use key code received by keyboard handler to search it (line 130). No doesn't matter if I enter the code directly or use string.byte.
sim/view/still_spot is command that I send to Xplane to change current view - same thing as if I choose from menu
sim/view/still_spot is command that I send to Xplane to change current view - same thing as if I choose from menu
Petr Medek
LUAmacros author
LUAmacros author