diff --git a/Nasal/controls.nas b/Nasal/controls.nas index 0a81c98d4..f67a0877f 100644 --- a/Nasal/controls.nas +++ b/Nasal/controls.nas @@ -327,25 +327,25 @@ rudderTrimAxis = func { rudderTrim(cmdarg().getNode("value").getValue()); } ## # Gear handling. # -gearDown = func { +var gearDown = func { if (arg[0] < 0) { setprop("/controls/gear/gear-down", 0); } elsif (arg[0] > 0) { setprop("/controls/gear/gear-down", 1); } } -gearToggle = func { gearDown(getprop("/controls/gear/gear-down") > 0 ? -1 : 1); } +var gearToggle = func { gearDown(getprop("/controls/gear/gear-down") > 0 ? -1 : 1); } ## # Brake handling. # -fullBrakeTime = 0.5; -applyBrakes = func(v, which = 0) { +var fullBrakeTime = 0.5; +var applyBrakes = func(v, which = 0) { if (which <= 0) { interpolate("/controls/gear/brake-left", v, fullBrakeTime); } if (which >= 0) { interpolate("/controls/gear/brake-right", v, fullBrakeTime); } } -applyParkingBrake = func(v) { +var applyParkingBrake = func(v) { if (!v) { return; } var p = "/controls/gear/brake-parking"; setprop(p, var i = !getprop(p)); @@ -355,11 +355,16 @@ applyParkingBrake = func(v) { ## # Weapon handling. # -trigger = func(b) { setprop("/controls/armament/trigger", b); } -weaponSelect = func(d) { +var trigger = func(b) setprop("/controls/armament/trigger", b); +var weaponSelect = func(d) { var ws = props.globals.getNode("/controls/armament/selected", 1); var n = ws.getValue(); if (n == nil) { n = 0; } ws.setIntValue(n + d); } +## +# Communication. +# +var ptt = func(b) setprop("/instrumentation/comm/ptt", b); + diff --git a/Nasal/gui.nas b/Nasal/gui.nas index ba859c5db..8f22905cb 100644 --- a/Nasal/gui.nas +++ b/Nasal/gui.nas @@ -821,7 +821,7 @@ debug_keys = { { name : "Shift-F3", desc : "load panel" }, { name : "Shift-F4", desc : "reload global preferences" }, { name : "Shift-F9", desc : "toggle FDM data logging" }, - { name : "Shift-Space", desc : "open property browser" }, + { name : "Shift-Enter", desc : "open property browser" }, ], }; @@ -869,7 +869,7 @@ common_aircraft_keys = { { name : "7/Home", desc : "increase elevator trim" }, { name : "8/Down", desc : "decrease elevator or AP altitude" }, { name : "9/PgUp", desc : "incr. throttle or AP autothrottle" }, - { name : "Space", desc : "fire starter on selected eng." }, + { name : "Space", desc : "PTT - Push To Talk (via VoIP)" }, { name : "!/@/#/$", desc : "select engine 1/2/3/4" }, { name : "b", desc : "apply all brakes" }, { name : "B", desc : "toggle parking brake" }, @@ -884,7 +884,8 @@ common_aircraft_keys = { { name : "m/M", desc : "mixture richer/leaner" }, { name : "n/N", desc : "propeller finer/coarser" }, { name : "P", desc : "toggle 2D panel" }, - { name : "s", desc : "swap panels" }, + { name : "S", desc : "swap panels" }, + { name : "s", desc : "fire starter on selected eng." }, { name : ", .", desc : "left/right brake (comma, period)" }, { name : "~", desc : "select all engines (tilde)" }, { name : "[ ]", desc : "flaps up/down" }, diff --git a/keyboard.xml b/keyboard.xml index e7f979327..65f59e7f1 100644 --- a/keyboard.xml +++ b/keyboard.xml @@ -2,8 +2,7 @@