-- Check if we're in the B738 aircraft, you can have multiple of these for different aircraf inside a single script
if (PLANE_ICAO == "B738") then
-- Create a callback function that we will call with our button
function AceKEY_Transponder_Up()
-- This is where the magic happens - command_once() will call whatever Xplane command you need.
command_once("laminar/B738/knob/transponder_mode_up")
end
-- Register the command into Xplane
create_command("FlyWithLua/AceKEY/Transponder_Up", "Transponder_Up", "AceKEY_Transponder_Up()", "", "")
-- This is the same thing for the Down action
function AceKEY_Transponder_Dn()
command_once("laminar/B738/knob/transponder_mode_dn")
end
create_command("FlyWithLua/AceKEY/Transponder_Dn", "Transponder_Dn", "AceKEY_Transponder_Dn()", "", "")
end