From cfcea38a1e3bef98ddb61d88bd3d59e4a7272c80 Mon Sep 17 00:00:00 2001
From: Matthew Maring <56924612+hayden2000@users.noreply.github.com>
Date: Thu, 2 Apr 2020 14:01:13 -0400
Subject: [PATCH] Keyboard mode now based on dialog visibility, add support for
 cap-lock/shift, implrment independent MCDU text entry

---
 A320-main.xml                    | 1277 ++++++++++++++++++++++++++----
 Models/Instruments/MCDU/MCDU.nas |    7 +-
 Nasal/MCDU/MCDU.nas              |    3 +-
 gui/dialogs/mcdu1-dlg.xml        |    4 +
 gui/dialogs/mcdu2-dlg.xml        |    4 +
 5 files changed, 1145 insertions(+), 150 deletions(-)

diff --git a/A320-main.xml b/A320-main.xml
index 421fbcce..27a9ad9f 100644
--- a/A320-main.xml
+++ b/A320-main.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 
 <!-- Copyright (c) 2019 Joshua Davidson (Octal450) -->
+<!-- Copyright (c) 2020 Matthew Maring (hayden2000) -->
 
 <PropertyList include="Aircraft/Generic/Human/Include/walker-include.xml">
 	<sim>
@@ -1455,14 +1456,22 @@
                 <desc>Toggle autopilot heading lock</desc>
                 <binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("CLR", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("CLR", 1);</script>
+				</binding>
                 <binding>
                     <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
                     <command>nasal</command>
                     <script>
@@ -1488,14 +1497,22 @@
                 <desc>PTT - Push To Talk (via FGCom)</desc>
                 <binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("SP", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("SP", 1);</script>
+				</binding>
                 <binding>
                     <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
                     <command>nasal</command>
                     <script>space(1, modifiers.getValue())</script>
@@ -1503,7 +1520,8 @@
                 <mod-up>
                     <binding>
                         <condition>
-				            <not><property>/MCDU/keyboard-entry</property></not>
+				            <not><property>/FMGC/keyboard-left</property></not>
+					        <not><property>/FMGC/keyboard-right</property></not>
 					    </condition>
                         <command>nasal</command>
                         <script>space(0, modifiers.getValue())</script>
@@ -1512,7 +1530,8 @@
                 <mod-shift>
                     <binding>
                         <condition>
-				            <not><property>/MCDU/keyboard-entry</property></not>
+				            <not><property>/FMGC/keyboard-left</property></not>
+					        <not><property>/FMGC/keyboard-right</property></not>
 					    </condition>
                         <command>nasal</command>
                         <script>space(1, modifiers.getValue())</script>
@@ -1520,7 +1539,8 @@
                     <mod-up>
                         <binding>
                             <condition>
-				                <not><property>/MCDU/keyboard-entry</property></not>
+				            	<not><property>/FMGC/keyboard-left</property></not>
+					        	<not><property>/FMGC/keyboard-right</property></not>
 					        </condition>
                             <command>nasal</command>
                             <script>space(0, modifiers.getValue())</script>
@@ -1533,15 +1553,23 @@
                 <desc>Chat Menu</desc>
                 <binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("PLUSMINUS", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("PLUSMINUS", 1);</script>
+				</binding>
 				<repeatable type="bool">false</repeatable>
 				<binding>
 				    <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
                     <command>dialog-show</command>
                     <dialog-name>chat-menu</dialog-name>
@@ -1552,14 +1580,22 @@
                 <desc>Right brake</desc>
                 <binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("DOT", 0);</script>
 				</binding>
 				<binding>
 				    <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("DOT", 1);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
                     <command>nasal</command>
                     <script>controls.applyBrakes(1, 1)</script>
@@ -1567,7 +1603,8 @@
                 <mod-up>
                     <binding>
                         <condition>
-				            <not><property>/MCDU/keyboard-entry</property></not>
+				            <not><property>/FMGC/keyboard-left</property></not>
+					        <not><property>/FMGC/keyboard-right</property></not>
 					    </condition>
                         <command>nasal</command>
                         <script>controls.applyBrakes(0, 1)</script>
@@ -1579,33 +1616,49 @@
                 <desc>Open property browser</desc>
 				<binding>
 				    <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
                     </condition>
                     <command>nasal</command>
                     <script>gui.property_browser();</script>
                 </binding>
                 <binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("SLASH", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("SLASH", 1);</script>
+				</binding>
             </key>
 			<key n="48">
 				<name>0</name>
                 <desc>Move rudder left</desc>
                 <binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("0", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("0", 1);</script>
+				</binding>
                 <repeatable type="bool">true</repeatable>
                 <binding>
                     <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
                     <command>property-adjust</command>
                     <property>/controls/flight/rudder</property>
@@ -1617,14 +1670,22 @@
 				<desc>Captain View/Elevator Trim Up</desc>
 				<binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("1", 0);</script>
 				</binding>
 				<binding>
 				    <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("1", 1);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 						<not><property>/options/system/keyboard-mode</property></not>
 					</condition>
 					<command>property-assign</command>
@@ -1633,7 +1694,8 @@
 				</binding>
 				<binding>
 				    <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 						<property>/options/system/keyboard-mode</property>
 					</condition>
 					<command>property-adjust</command>
@@ -1646,14 +1708,22 @@
 				<desc>First Officer View/Elevator Up</desc>
 				<binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("2", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("2", 1);</script>
+				</binding>
 				<binding>
 					<condition>
-						<not><property>/MCDU/keyboard-entry</property></not>
+						<not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 						<not><property>/options/system/keyboard-mode</property></not>
 					</condition>
 					<command>property-assign</command>
@@ -1662,7 +1732,8 @@
 				</binding>
 				<binding>
 					<condition>
-						<not><property>/MCDU/keyboard-entry</property></not>
+						<not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 						<property>/options/system/keyboard-mode</property>
 					</condition>
 					<command>nasal</command>
@@ -1676,14 +1747,22 @@
 				<desc>Overhead View/Throttle Decrease</desc>
 				<binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("3", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("3", 1);</script>
+				</binding>
 				<binding>
 					<condition>
-						<not><property>/MCDU/keyboard-entry</property></not>
+						<not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 						<not><property>/options/system/keyboard-mode</property></not>
 					</condition>
 					<command>property-assign</command>
@@ -1692,7 +1771,8 @@
 				</binding>
 				<binding>
 					<condition>
-						<not><property>/MCDU/keyboard-entry</property></not>
+						<not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 						<property>/options/system/keyboard-mode</property>
 					</condition>
 					<command>nasal</command>
@@ -1706,14 +1786,22 @@
 				<desc>Forward Pedestal/Aileron Left</desc>
 				<binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("4", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("4", 1);</script>
+				</binding>
 				<binding>
 					<condition>
-						<not><property>/MCDU/keyboard-entry</property></not>
+						<not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 						<not><property>/options/system/keyboard-mode</property></not>
 					</condition>
 					<command>property-assign</command>
@@ -1722,7 +1810,8 @@
 				</binding>
 				<binding>
 					<condition>
-						<not><property>/MCDU/keyboard-entry</property></not>
+						<not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 						<property>/options/system/keyboard-mode</property>
 					</condition>
 					<command>nasal</command>
@@ -1736,14 +1825,22 @@
 				<desc>Aft Pedestal/Center Controls</desc>
 				<binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("5", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("5", 1);</script>
+				</binding>
 				<binding>
 					<condition>
-						<not><property>/MCDU/keyboard-entry</property></not>
+						<not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 						<not><property>/options/system/keyboard-mode</property></not>
 					</condition>
 					<command>property-assign</command>
@@ -1752,7 +1849,8 @@
 				</binding>
 				<binding>
 					<condition>
-						<not><property>/MCDU/keyboard-entry</property></not>
+						<not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 						<property>/options/system/keyboard-mode</property>
 					</condition>
 					<command>nasal</command>
@@ -1768,14 +1866,22 @@
 				<desc>FCU Panel/Aileron Right</desc>
 				<binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("6", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("6", 1);</script>
+				</binding>
 				<binding>
 					<condition>
-						<not><property>/MCDU/keyboard-entry</property></not>
+						<not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 						<not><property>/options/system/keyboard-mode</property></not>
 					</condition>
 					<command>property-assign</command>
@@ -1784,7 +1890,8 @@
 				</binding>
 				<binding>
 					<condition>
-						<not><property>/MCDU/keyboard-entry</property></not>
+						<not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 						<property>/options/system/keyboard-mode</property>
 					</condition>
 					<command>nasal</command>
@@ -1798,14 +1905,22 @@
 				<desc>Elevator Trim Down</desc>
 				<binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("7", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("7", 1);</script>
+				</binding>
 				<!--binding>
 					<condition>
-						<not><property>/MCDU/keyboard-entry</property></not>
+						<not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 						<not><property>/options/system/keyboard-mode</property></not>
 					</condition>
 					<command>property-assign</command>
@@ -1814,7 +1929,8 @@
 				</binding-->
 				<binding>
 					<condition>
-						<not><property>/MCDU/keyboard-entry</property></not>
+						<not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 						<property>/options/system/keyboard-mode</property>
 					</condition>
 					<command>property-adjust</command>
@@ -1827,14 +1943,22 @@
 				<desc>Elevator Down</desc>
 				<binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("8", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("8", 1);</script>
+				</binding>
 				<!--binding>
 					<condition>
-						<not><property>/MCDU/keyboard-entry</property></not>
+						<not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 						<not><property>/options/system/keyboard-mode</property></not>
 					</condition>
 					<command>property-assign</command>
@@ -1843,7 +1967,8 @@
 				</binding-->
 				<binding>
 					<condition>
-						<not><property>/MCDU/keyboard-entry</property></not>
+						<not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 						<property>/options/system/keyboard-mode</property>
 					</condition>
 					<command>nasal</command>
@@ -1857,14 +1982,22 @@
 				<desc>Throttle Increase</desc>
 				<binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("9", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("9", 1);</script>
+				</binding>
 				<!--binding>
 					<condition>
-						<not><property>/MCDU/keyboard-entry</property></not>
+						<not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 						<not><property>/options/system/keyboard-mode</property></not>
 					</condition>
 					<command>property-assign</command>
@@ -1873,7 +2006,8 @@
 				</binding-->
 				<binding>
 					<condition>
-						<not><property>/MCDU/keyboard-entry</property></not>
+						<not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 						<property>/options/system/keyboard-mode</property>
 					</condition>
 					<command>nasal</command>
@@ -1882,74 +2016,662 @@
 					</script>
 				</binding>
 			</key>
+			<key n="65"> 
+				<name>SHIFT-a</name>
+				<repeatable>false</repeatable>
+				<binding n="0">
+					<condition>
+						<and>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
+						<or>
+						<equals>
+							<property>sim/current-view/name</property>
+							<value>Walk View</value>
+						</equals>
+						<equals>
+							<property>sim/current-view/name</property>
+							<value>Walker Orbit View</value>
+						</equals>
+						</or>
+						</and>
+					</condition>
+					<command>property-assign</command>
+					<property>sim/walker/key-triggers/slide</property>
+					<value>-1</value>
+				</binding>
+				<binding n="1">
+					<condition>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
+					</condition>
+					<command>property-assign</command>
+					<property>sim/walker/key-triggers/speed</property>
+					<property>sim/walker/speed-mps</property>
+				</binding>
+				<binding n="2">
+					<condition>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
+					</condition>
+					<command>property-multiply</command>
+					<property>sim/walker/key-triggers/speed</property>
+					<factor>2.5</factor>
+				</binding>
+				<binding n="3">
+					<condition>
+						<and>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
+						<not-equals>
+							<property>sim/current-view/name</property>
+							<value>Walk View</value>
+						</not-equals>
+						<not-equals>
+							<property>sim/current-view/name</property>
+							<value>Walker Orbit View</value>
+						</not-equals>
+						</and>
+					 </condition>
+					<command>nasal</command>
+					<script>controls.speedup(-1);</script>
+				</binding>
+				<mod-up>
+					<binding n="0">
+						<condition>
+				        	<not><property>/FMGC/keyboard-left</property></not>
+				        	<not><property>/FMGC/keyboard-right</property></not>
+						</condition>
+						<command>property-assign</command>
+						<property>sim/walker/key-triggers/slide</property>
+						<value>0</value>
+					</binding>
+					<binding n="1">
+						<condition>
+				        	<not><property>/FMGC/keyboard-left</property></not>
+				        	<not><property>/FMGC/keyboard-right</property></not>
+						</condition>
+						<command>property-assign</command>
+						<property>sim/walker/key-triggers/speed</property>
+						<property>sim/walker/speed-mps</property>
+					</binding>
+				</mod-up>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-left</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("A", 0);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("A", 1);</script>
+				</binding>
+			</key>
+			<key n="66">
+				<name>SHIFT-b</name>
+				<desc>MCDU</desc>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-left</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("B", 0);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("B", 1);</script>
+				</binding>
+				<binding>
+					<condition>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
+					</condition>
+   					<command>nasal</command>
+   					<script>controls.applyParkingBrake(1)</script>
+  				</binding>
+  				<mod-up>
+   					<binding>
+   						<condition>
+				        	<not><property>/FMGC/keyboard-left</property></not>
+				        	<not><property>/FMGC/keyboard-right</property></not>
+						</condition>
+    					<command>nasal</command>
+    					<script>controls.applyParkingBrake(0)</script>
+   					</binding>
+  				</mod-up>
+			</key>
+			<key n="67">
+				<name>SHIFT-c</name>
+				<desc>MCDU</desc>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-left</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("C", 0);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("C", 1);</script>
+				</binding>
+			</key>
 			<key n="68">
-				<name>D</name>
+				<name>SHIFT-d</name>
 				<desc>Autopilot Disconnect</desc>
 				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-left</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("D", 0);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("D", 1);</script>
+				</binding>
+				<binding>
+					<condition>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
+					</condition>
 					<command>nasal</command>
 					<script>fcu.FCUController.APDisc();</script>
 				</binding>
 			</key>
+			<key n="69">
+				<name>SHIFT-e</name>
+				<desc>MCDU</desc>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-left</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("E", 0);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("E", 1);</script>
+				</binding>
+			</key>
 			<key n="70">
 				<name>SHIFT-f</name>
 				<desc>CL power</desc>
 				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-left</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("F", 0);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("F", 1);</script>
+				</binding>
+				<binding>
+					<condition>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
+					</condition>
 					<command>nasal</command>
 					<script>
 					systems.doCLThrust();
 					</script>
 				</binding>
 			</key>
-			<key n="77">
-				<name>SHIFT-m</name>
-				<desc>MCDU keyboard entry disabled</desc>
+			<key n="71">
+				<name>SHIFT-g</name>
+				<desc>MCDU</desc>
 				<binding>
 				    <condition>
-				        <equals>
-						    <property>/MCDU/keyboard-entry</property>
-						    <value>1</value>
-						</equals>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
-					<script>mcdu.setMode(0);</script>
-					<!--<command>property-assign</command>
-					<property>/MCDU/keyboard-entry</property>
-					<value>0</value>-->
+					<script>mcdu.button("G", 0);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("G", 1);</script>
+				</binding>
+				<binding>
+					<condition>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
+					</condition>
+   					<command>nasal</command>
+   					<script>controls.gearDown(1)</script>
+  				</binding>
+			  	<mod-up>
+			   		<binding>
+			   			<condition>
+				        	<not><property>/FMGC/keyboard-left</property></not>
+				        	<not><property>/FMGC/keyboard-right</property></not>
+						</condition>
+						<command>nasal</command>
+						<script>controls.gearDown(0)</script>
+			   		</binding>
+			  	</mod-up>
+			</key>
+			<key n="72">
+				<name>SHIFT-h</name>
+				<desc>MCDU</desc>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-left</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("H", 0);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("H", 1);</script>
+				</binding>
+				<binding>
+					<condition>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
+					</condition>
+   					<command>nasal</command>
+   					<script>aircraft.HUD.cycle_brightness()</script>
+  				</binding>
+			</key>
+			<key n="73">
+				<name>SHIFT-i</name>
+				<desc>MCDU</desc>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-left</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("I", 0);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("I", 1);</script>
+				</binding>
+				<binding>
+					<condition>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
+					</condition>
+  					<command>nasal</command>
+   					<script>aircraft.HUD.cycle_type()</script>
+  				</binding>
+			</key>
+			<key n="74">
+				<name>SHIFT-j</name>
+				<desc>MCDU</desc>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-left</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("J", 0);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("J", 1);</script>
+				</binding>
+			</key>
+			<key n="75">
+				<name>SHIFT-k</name>
+				<desc>MCDU</desc>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-left</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("K", 0);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("K", 1);</script>
+				</binding>
+			</key>
+			<key n="76">
+				<name>SHIFT-l</name>
+				<desc>MCDU</desc>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-left</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("L", 0);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("L", 1);</script>
+				</binding>
+			</key>
+			<key n="77">
+				<name>SHIFT-m</name>
+				<desc>MCDU</desc>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-left</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("M", 0);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("M", 1);</script>
 				</binding>
 			</key>
 			<key n="78">
 				<name>SHIFT-n</name>
-				<desc>MCDU keyboard entry enabled</desc>
+				<desc>MCDU</desc>
 				<binding>
 				    <condition>
-				        <equals>
-						    <property>/MCDU/keyboard-entry</property>
-						    <value>0</value>
-						</equals>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
-					<script>mcdu.setMode(1);</script>
-					<!--<command>property-assign</command>
-					<property>/MCDU/keyboard-entry</property>
-					<value>1</value>-->
+					<script>mcdu.button("N", 0);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("N", 1);</script>
+				</binding>
+			</key>
+			<key n="79">
+				<name>SHIFT-o</name>
+				<desc>MCDU</desc>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-left</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("O", 0);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("O", 1);</script>
+				</binding>
+			</key>
+			<key n="80">
+				<name>SHIFT-p</name>
+				<desc>MCDU</desc>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-left</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("P", 0);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("P", 1);</script>
+				</binding>
+				<binding>
+					<condition>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
+					</condition>
+   					<command>property-toggle</command>
+   					<property>/sim/panel/visibility</property>
+  				</binding>
+			</key>
+			<key n="81">
+				<name>SHIFT-q</name>
+				<desc>MCDU</desc>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-left</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("Q", 0);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("Q", 1);</script>
+				</binding>
+			</key>
+			<key n="82">
+				<name>SHIFT-r</name>
+				<desc>MCDU</desc>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-left</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("R", 0);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("R", 1);</script>
+				</binding>
+			</key>
+			<key n="83">
+				<name>SHIFT-s</name>
+				<desc>MCDU</desc>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-left</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("S", 0);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("S", 1);</script>
+				</binding>
+			</key>
+			<key n="84">
+				<name>SHIFT-t</name>
+				<desc>MCDU</desc>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-left</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("T", 0);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("T", 1);</script>
+				</binding>
+			</key>
+			<key n="85">
+				<name>SHIFT-u</name>
+				<desc>MCDU</desc>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-left</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("U", 0);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("U", 1);</script>
+				</binding>
+			</key>
+			<key n="86">
+				<name>SHIFT-v</name>
+				<desc>MCDU</desc>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-left</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("V", 0);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("V", 1);</script>
+				</binding>
+				<binding>
+					<condition>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
+					</condition>
+   					<command>nasal</command>
+   					<script>view.stepView(-1)</script>
+  				</binding>
+			</key>
+			<key n="87">
+				<name>SHIFT-w</name>
+				<desc>MCDU</desc>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-left</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("W", 0);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("W", 1);</script>
 				</binding>
 			</key>
 			<key n="88">
-				<name>X</name>
+				<name>SHIFT-x</name>
 				<desc>Increase field of view</desc>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-left</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("X", 0);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("X", 1);</script>
+				</binding>
 				<repeatable type="bool">true</repeatable>
 				<binding>
+					<condition>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
+					</condition>
 					<command>nasal</command>
 					<script>libraries.fovZoom(1);</script>
 				</binding>
 			</key>
+			<key n="89">
+				<name>SHIFT-y</name>
+				<desc>MCDU</desc>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-left</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("Y", 0);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("Y", 1);</script>
+				</binding>
+			</key>
+			<key n="90">
+				<name>SHIFT-z</name>
+				<desc>MCDU</desc>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-left</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("Z", 0);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("Z", 1);</script>
+				</binding>
+				<binding>
+					<condition>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
+					</condition>
+   					<command>nasal</command>
+   					<script>environment.decreaseVisibility()</script>
+  				</binding>
+			</key>
 			<key n="97">
                 <name>a</name>
                 <desc>Slide left</desc>
                 <repeatable>false</repeatable>
                 <binding n="0">
                     <condition>
-                        <not><property>/MCDU/keyboard-entry</property></not>
+                        <not><property>/FMGC/keyboard-left</property></not>
+                        <not><property>/FMGC/keyboard-right</property></not>
                         <equals>
                             <property>sim/current-view/name</property>
                             <value>Walk View</value>
@@ -1961,7 +2683,8 @@
                 </binding>
                 <binding n="1">
                     <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
                     <command>property-assign</command>
                     <property>sim/walker/key-triggers/speed</property>
@@ -1970,7 +2693,8 @@
                 <binding n="2">
                     <condition>
                         <and>
-                        <not><property>/MCDU/keyboard-entry</property></not>
+                        <not><property>/FMGC/keyboard-left</property></not>
+                        <not><property>/FMGC/keyboard-right</property></not>
                         <not-equals>
                             <property>sim/current-view/name</property>
                             <value>Walk View</value>
@@ -1986,7 +2710,8 @@
                 </binding>
                 <binding n="3">
                     <condition>
-                        <not><property>/MCDU/keyboard-entry</property></not>
+                        <not><property>/FMGC/keyboard-left</property></not>
+                        <not><property>/FMGC/keyboard-right</property></not>
                         <equals>
                             <property>sim/current-view/name</property>
                             <value>Walker Orbit View</value>
@@ -2002,7 +2727,8 @@
                 <mod-up>
                     <binding n="0">
                         <condition>
-				            <not><property>/MCDU/keyboard-entry</property></not>
+				            <not><property>/FMGC/keyboard-left</property></not>
+					        <not><property>/FMGC/keyboard-right</property></not>
 					    </condition>
                         <command>property-assign</command>
                         <property>sim/walker/key-triggers/slide</property>
@@ -2010,7 +2736,8 @@
                     </binding>
                     <binding n="1">
                         <condition>
-				            <not><property>/MCDU/keyboard-entry</property></not>
+				            <not><property>/FMGC/keyboard-left</property></not>
+					        <not><property>/FMGC/keyboard-right</property></not>
 					    </condition>
                         <command>property-assign</command>
                         <property>sim/walker/key-triggers/speed</property>
@@ -2019,25 +2746,40 @@
                 </mod-up>
                 <binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("A", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("A", 1);</script>
+				</binding>
             </key>
             <key n="98">
                 <name>b</name>
                 <desc>Apply all brakes</desc>
                 <binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("B", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("B", 1);</script>
+				</binding>
                 <binding>
                     <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
                     <command>nasal</command>
                     <script>controls.applyBrakes(1)</script>
@@ -2045,7 +2787,8 @@
                 <mod-up>
                     <binding>
                         <condition>
-				            <not><property>/MCDU/keyboard-entry</property></not>
+				            <not><property>/FMGC/keyboard-left</property></not>
+					        <not><property>/FMGC/keyboard-right</property></not>
 					    </condition>
                         <command>nasal</command>
                         <script>controls.applyBrakes(0)</script>
@@ -2057,15 +2800,23 @@
 				<desc>Reset view to center</desc>
 				<binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("C", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("C", 1);</script>
+				</binding>
 				<repeatable type="bool">true</repeatable>
 				<binding>
 				    <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
 					<command>nasal</command>
 					<script>libraries.resetView();</script>
@@ -2077,7 +2828,8 @@
                 <repeatable>false</repeatable>
                 <binding n="0">
                     <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					    <equals>
                             <property>sim/current-view/name</property>
                             <value>Walk View</value>
@@ -2089,7 +2841,8 @@
                 </binding>
                 <binding n="1">
                     <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
                     <command>property-assign</command>
                     <property>sim/walker/key-triggers/speed</property>
@@ -2097,7 +2850,8 @@
                 </binding>
                 <binding n="2">
                     <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
                         <equals>
                             <property>sim/current-view/name</property>
                             <value>Walker Orbit View</value>
@@ -2113,7 +2867,8 @@
                 <mod-up>
                     <binding n="0">
                         <condition>
-				            <not><property>/MCDU/keyboard-entry</property></not>
+				            <not><property>/FMGC/keyboard-left</property></not>
+					        <not><property>/FMGC/keyboard-right</property></not>
 					    </condition>
                         <command>property-assign</command>
                         <property>sim/walker/key-triggers/slide</property>
@@ -2121,7 +2876,8 @@
                     </binding>
                     <binding n="1">
                         <condition>
-				            <not><property>/MCDU/keyboard-entry</property></not>
+				            <not><property>/FMGC/keyboard-left</property></not>
+					        <not><property>/FMGC/keyboard-right</property></not>
 					    </condition>
                         <command>property-assign</command>
                         <property>sim/walker/key-triggers/speed</property>
@@ -2130,25 +2886,40 @@
                 </mod-up>
                 <binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("D", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("D", 1);</script>
+				</binding>
             </key>
             <key n="101">
 				<name>e</name>
 				<desc>Thrust Levers Idle</desc>
 				<binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("E", 0);</script>
 				</binding>
 				<binding>
 				    <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("E", 1);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
 					<command>nasal</command>
 					<script>
@@ -2161,14 +2932,22 @@
 				<desc>TOGA power</desc>
 				<binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("F", 0);</script>
 				</binding>
 				<binding>
 				    <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("F", 1);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
 					<command>nasal</command>
 					<script>
@@ -2181,14 +2960,22 @@
                 <desc>Gear Up</desc>
                 <binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("G", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("G", 1);</script>
+				</binding>
                 <binding>
                     <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
                     <command>nasal</command>
                     <script>controls.gearDown(-1)</script>
@@ -2196,7 +2983,8 @@
                 <mod-up>
                     <binding>
                         <condition>
-				            <not><property>/MCDU/keyboard-entry</property></not>
+				            <not><property>/FMGC/keyboard-left</property></not>
+					        <not><property>/FMGC/keyboard-right</property></not>
 					    </condition>
                         <command>nasal</command>
                         <script>controls.gearDown(0)</script>
@@ -2208,14 +2996,22 @@
 				<desc>HUD Master Switch</desc>
 				<binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("H", 0);</script>
 				</binding>
 				<binding>
 				    <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("H", 1);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
                     <command>nasal</command>
                     <script>aircraft.HUD.cycle_color()</script>
@@ -2227,14 +3023,22 @@
 				<repeatable type="bool">true</repeatable>
 				<binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("I", 0);</script>
 				</binding>
 				<binding>
 				    <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("I", 1);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
 					<command>nasal</command>
 					<script>libraries.lightsView();</script>
@@ -2245,14 +3049,22 @@
                 <desc>Decrease spoilers</desc>
                 <binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("J", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("J", 1);</script>
+				</binding>
                 <binding>
                     <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
                     <command>nasal</command>
                     <script>controls.stepSpoilers(-1)</script>
@@ -2263,14 +3075,22 @@
                 <desc>Increase spoilers</desc>
                 <binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("K", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("K", 1);</script>
+				</binding>
                 <binding>
                     <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
                     <command>nasal</command>
                     <script>controls.stepSpoilers(1)</script>
@@ -2281,14 +3101,22 @@
 				<desc>Flashlight</desc>
 				<binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("L", 0);</script>
 				</binding>
 				<binding>
 				    <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("L", 1);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
 					<command>property-cycle</command>
 					<property>sim/rendering/als-secondary-lights/use-flashlight</property>
@@ -2297,7 +3125,8 @@
 				</binding>
 				<binding>
 				    <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
 					<command>property-cycle</command>
 					<property>sim/rendering/als-secondary-lights/use-searchlight</property>
@@ -2310,37 +3139,59 @@
 				<desc>MCDU</desc>
 				<binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("M", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("M", 1);</script>
+				</binding>
 			</key>
 			<key n="110">
 				<name>n</name>
 				<desc>MCDU</desc>
 				<binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("N", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("N", 1);</script>
+				</binding>
 			</key>
 			<key n="111">
 				<name>o</name>
 				<desc>Change view to overhead</desc>
 				<binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("O", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("O", 1);</script>
+				</binding>
 				<repeatable type="bool">true</repeatable>
 				<binding>
 				    <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
 					<command>nasal</command>
 					<script>libraries.overheadView();</script>
@@ -2351,14 +3202,22 @@
                 <desc>Toggle the pause state of the sim</desc>
                 <binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("P", 0);</script>
 				</binding>
 				<binding>
 				    <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("P", 1);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
                     <command>pause</command>
                 </binding>
@@ -2368,22 +3227,36 @@
 				<desc>MCDU</desc>
 				<binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("Q", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("Q", 1);</script>
+				</binding>
 			</key>
 			<key n="114">
 				<name>r</name>
 				<desc>MCDU</desc>
 				<binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("R", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("R", 1);</script>
+				</binding>
 			</key>
             <key n="115">
                 <name>s</name>
@@ -2392,7 +3265,8 @@
                 <binding n="0">
                     <condition>
                         <and>
-                        <not><property>/MCDU/keyboard-entry</property></not>
+                        <not><property>/FMGC/keyboard-left</property></not>
+                        <not><property>/FMGC/keyboard-right</property></not>
                         <or>
                         <equals>
                             <property>sim/current-view/name</property>
@@ -2411,7 +3285,8 @@
                 </binding>
                 <binding n="1">
                     <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
                     <command>property-assign</command>
                     <property>sim/walker/key-triggers/speed</property>
@@ -2420,7 +3295,8 @@
                 <binding n="2">
                     <condition>
                         <and>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
                         <not-equals>
                             <property>sim/current-view/name</property>
                             <value>Walk View</value>
@@ -2437,7 +3313,8 @@
                 <mod-up>
                     <binding n="0">
                         <condition>
-				            <not><property>/MCDU/keyboard-entry</property></not>
+				            <not><property>/FMGC/keyboard-left</property></not>
+					        <not><property>/FMGC/keyboard-right</property></not>
 					    </condition>
                         <command>property-assign</command>
                         <property>sim/walker/key-triggers/forward</property>
@@ -2445,7 +3322,8 @@
                     </binding>
                     <binding n="1">
                         <condition>
-				            <not><property>/MCDU/keyboard-entry</property></not>
+				            <not><property>/FMGC/keyboard-left</property></not>
+					        <not><property>/FMGC/keyboard-right</property></not>
 					    </condition>
                         <command>property-assign</command>
                         <property>sim/walker/key-triggers/speed</property>
@@ -2453,7 +3331,8 @@
                     </binding>
                     <binding n="2">
                         <condition>
-				            <not><property>/MCDU/keyboard-entry</property></not>
+				            <not><property>/FMGC/keyboard-left</property></not>
+					        <not><property>/FMGC/keyboard-right</property></not>
 					    </condition>
                         <command>nasal</command>
                         <script>controls.startEngine(0)</script>
@@ -2461,11 +3340,18 @@
                 </mod-up>
                 <binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("S", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("S", 1);</script>
+				</binding>
             </key>
 			<key n="116">
                 <name>t</name>
@@ -2473,14 +3359,22 @@
                 <repeatable type="bool">true</repeatable>
                 <binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("T", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("T", 1);</script>
+				</binding>
                 <binding>
                     <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
                     <command>property-adjust</command>
                     <property>/sim/time/warp-delta</property>
@@ -2489,7 +3383,8 @@
                 </binding>
                 <binding>
                     <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
                     <command>show-message</command>
                     <id>warp-feedback</id>
@@ -2499,7 +3394,8 @@
                 <mod-up>
                     <binding>
                         <condition>
-				            <not><property>/MCDU/keyboard-entry</property></not>
+				            <not><property>/FMGC/keyboard-left</property></not>
+					        <not><property>/FMGC/keyboard-right</property></not>
 					    </condition>
                         <command>property-assign</command>
                         <property>/sim/time/warp-delta</property>
@@ -2512,15 +3408,23 @@
 				<desc>Change view to pedestal</desc>
 				<binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("U", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("U", 1);</script>
+				</binding>
 				<repeatable type="bool">true</repeatable>
 				<binding>
 				    <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
 					<command>nasal</command>
 					<script>libraries.pedestalView();</script>
@@ -2531,14 +3435,22 @@
                 <desc>Scroll through views</desc>
                 <binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("V", 0);</script>
 				</binding>
 				<binding>
 				    <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("V", 1);</script>
+				</binding>
+				<binding>
+				    <condition>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
                     <command>nasal</command>
                     <script>view.stepView(1)</script>
@@ -2549,7 +3461,8 @@
 				<desc>Walk forward</desc>
 				<binding n="0">
 				    <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
                     <command>property-assign</command>
                     <property>sim/walker/key-triggers/forward</property>
@@ -2557,7 +3470,8 @@
                 </binding>
                 <binding n="1">
                     <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
                     <command>property-assign</command>
                     <property>sim/walker/key-triggers/speed</property>
@@ -2566,7 +3480,8 @@
                 <mod-up>
                     <binding n="0">
                         <condition>
-				            <not><property>/MCDU/keyboard-entry</property></not>
+				            <not><property>/FMGC/keyboard-left</property></not>
+					        <not><property>/FMGC/keyboard-right</property></not>
 					    </condition>
                         <command>property-assign</command>
                         <property>sim/walker/key-triggers/forward</property>
@@ -2574,7 +3489,8 @@
                     </binding>
                     <binding n="1">
                         <condition>
-				            <not><property>/MCDU/keyboard-entry</property></not>
+				            <not><property>/FMGC/keyboard-left</property></not>
+					        <not><property>/FMGC/keyboard-right</property></not>
 					    </condition>
                         <command>property-assign</command>
                         <property>sim/walker/key-triggers/speed</property>
@@ -2583,26 +3499,41 @@
                 </mod-up>
                 <binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("W", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("W", 1);</script>
+				</binding>
 			</key>
 			<key n="120">
 				<name>x</name>
 				<desc>Decrease field of view</desc>
 				<binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("X", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("X", 1);</script>
+				</binding>
 				<repeatable type="bool">true</repeatable>
 				<binding>
 				    <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
 					<command>nasal</command>
 					<script>libraries.fovZoom(-1);</script>
@@ -2613,15 +3544,23 @@
 				<desc>Change view to autopilot</desc>
 				<binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("Y", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("Y", 1);</script>
+				</binding>
 				<repeatable type="bool">true</repeatable>
 				<binding>
 				    <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
 					<command>nasal</command>
 					<script>libraries.autopilotView();</script>
@@ -2632,15 +3571,23 @@
                 <desc>Increase Visibility</desc>
                 <binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.button("Z", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.button("Z", 1);</script>
+				</binding>
                 <repeatable type="bool">true</repeatable>
                 <binding>
                     <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
                     <command>nasal</command>
                     <script>environment.increaseVisibility()</script>
@@ -2737,15 +3684,23 @@
                 <desc>Move aileron left (or adjust AP heading.)</desc>
                 <binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.arrowbutton("left", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.arrowbutton("left", 1);</script>
+				</binding>
                 <repeatable type="bool">true</repeatable>
                 <binding>
                     <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
                     <command>nasal</command>
                     <script>
@@ -2759,7 +3714,8 @@
                     <desc>Look left</desc>
                     <binding>
                         <condition>
-				            <not><property>/MCDU/keyboard-entry</property></not>
+				            <not><property>/FMGC/keyboard-left</property></not>
+					        <not><property>/FMGC/keyboard-right</property></not>
 					    </condition>
                         <command>property-assign</command>
                         <property>/sim/current-view/goal-heading-offset-deg</property>
@@ -2773,14 +3729,22 @@
                 <repeatable type="bool">true</repeatable>
                 <binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.arrowbutton("up", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.arrowbutton("up", 1);</script>
+				</binding>
                 <binding>
                     <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
                     <command>nasal</command>
                     <script>
@@ -2794,7 +3758,8 @@
                     <desc>Look forward</desc>
                     <binding>
                         <condition>
-				            <not><property>/MCDU/keyboard-entry</property></not>
+				            <not><property>/FMGC/keyboard-left</property></not>
+					        <not><property>/FMGC/keyboard-right</property></not>
 					    </condition>
                         <command>property-assign</command>
                         <property>/sim/current-view/goal-heading-offset-deg</property>
@@ -2808,14 +3773,22 @@
                 <repeatable type="bool">true</repeatable>
                 <binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.arrowbutton("right", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.arrowbutton("right", 1);</script>
+				</binding>
                 <binding>
                     <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
                     <command>nasal</command>
                     <script>
@@ -2830,7 +3803,8 @@
                     <desc>Look right</desc>
                     <binding>
                         <condition>
-				            <not><property>/MCDU/keyboard-entry</property></not>
+				            <not><property>/FMGC/keyboard-left</property></not>
+					        <not><property>/FMGC/keyboard-right</property></not>
 					    </condition>
                         <command>property-assign</command>
                         <property>/sim/current-view/goal-heading-offset-deg</property>
@@ -2843,15 +3817,23 @@
                 <desc>Elevator up or increase autopilot altitude</desc>
                 <binding>
 				    <condition>
-				        <property>/MCDU/keyboard-entry</property>
+				        <property>/FMGC/keyboard-left</property>
 					</condition>
 					<command>nasal</command>
 					<script>mcdu.arrowbutton("down", 0);</script>
 				</binding>
+				<binding>
+				    <condition>
+				        <property>/FMGC/keyboard-right</property>
+					</condition>
+					<command>nasal</command>
+					<script>mcdu.arrowbutton("down", 1);</script>
+				</binding>
                 <repeatable type="bool">true</repeatable>
                 <binding>
                     <condition>
-				        <not><property>/MCDU/keyboard-entry</property></not>
+				        <not><property>/FMGC/keyboard-left</property></not>
+				        <not><property>/FMGC/keyboard-right</property></not>
 					</condition>
                     <command>nasal</command>
                     <script>
@@ -2865,7 +3847,8 @@
                     <desc>Look backwards</desc>
                     <binding>
                         <condition>
-				            <not><property>/MCDU/keyboard-entry</property></not>
+				            <not><property>/FMGC/keyboard-left</property></not>
+					        <not><property>/FMGC/keyboard-right</property></not>
 					    </condition>
                         <command>property-assign</command>
                         <property>/sim/current-view/goal-heading-offset-deg</property>
diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas
index 0cbb0e6a..1b8e8157 100644
--- a/Models/Instruments/MCDU/MCDU.nas
+++ b/Models/Instruments/MCDU/MCDU.nas
@@ -32,7 +32,8 @@ setprop("MCDUC/colors/mag/g", 0.3333);
 setprop("MCDUC/colors/mag/b", 0.7541);
 
 # Fetch nodes:
-var mcdu_keyboard_entry = props.globals.getNode("MCDU/keyboard-entry", 1);
+var mcdu_keyboard_left = props.globals.getNode("FMGC/keyboard-left", 0);
+var mcdu_keyboard_right = props.globals.getNode("FMGC/keyboard-right", 0);
 
 #ACCONFIG
 var ac1 = props.globals.getNode("systems/electrical/bus/ac-1", 1);
@@ -2738,12 +2739,14 @@ setlistener("sim/signals/fdm-initialized", func {
 var MCDU_update = maketimer(0.125, func {
 	canvas_MCDU_base.update();
 });
-
+	
 var showMCDU1 = func {
+	setprop("FMGC/keyboard-left", 1);
 	gui.showDialog("mcdu1");
 }
 
 var showMCDU2 = func {
+	setprop("FMGC/keyboard-right", 1);
 	gui.showDialog("mcdu2");
 }
 
diff --git a/Nasal/MCDU/MCDU.nas b/Nasal/MCDU/MCDU.nas
index d3680e50..bea62e50 100644
--- a/Nasal/MCDU/MCDU.nas
+++ b/Nasal/MCDU/MCDU.nas
@@ -17,7 +17,8 @@ var MCDU_reset = func(i) {
 	setprop("MCDU[" ~ i ~ "]/scratchpad", "SELECT DESIRED SYSTEM");
 	setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
 	
-	setprop("MCDU/keyboard-entry", 0);
+	setprop("FMGC/keyboard-left", 0);
+	setprop("FMGC/keyboard-right", 0);
 	
 	#ACCONFIG
 	setprop("FMGC/internal/navdatabase", "01JAN-28JAN");
diff --git a/gui/dialogs/mcdu1-dlg.xml b/gui/dialogs/mcdu1-dlg.xml
index ec89614b..9bb67e0b 100644
--- a/gui/dialogs/mcdu1-dlg.xml
+++ b/gui/dialogs/mcdu1-dlg.xml
@@ -23,6 +23,10 @@
 			<pref-height>20</pref-height>
 			<legend>X</legend>
 			<key>Esc</key>
+			<binding>
+				<command>nasal</command>
+				<script>setprop("FMGC/keyboard-left", 0);</script>
+			</binding>
 			<binding>
 				<command>dialog-close</command>
 			</binding>
diff --git a/gui/dialogs/mcdu2-dlg.xml b/gui/dialogs/mcdu2-dlg.xml
index 0f840715..7849233f 100644
--- a/gui/dialogs/mcdu2-dlg.xml
+++ b/gui/dialogs/mcdu2-dlg.xml
@@ -23,6 +23,10 @@
 			<pref-height>20</pref-height>
 			<legend>X</legend>
 			<key>Esc</key>
+			<binding>
+				<command>nasal</command>
+				<script>setprop("FMGC/keyboard-right", 0);</script>
+			</binding>
 			<binding>
 				<command>dialog-close</command>
 			</binding>