From c587c9dd3a5774251d929cc9254f5ec2b395165e Mon Sep 17 00:00:00 2001
From: mfranz <mfranz>
Date: Fri, 9 Feb 2007 13:31:04 +0000
Subject: [PATCH] In mouse view mode <=> one could already move the view
 left/right/up/down when dragging the mouse with middle mouse button (MMB)
 pressed (reset with MMB+LMB):

Add support for forward/backward moving (MMB+KbdCtrl). With this one can,
for example, read what's written on the backside of the cup of coffee
on top of the screen in the E3B's operator room, or walk around between
the passenger seats in the fokker70 searching for the toilet.  :-)
---
 mice.xml | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/mice.xml b/mice.xml
index cc53bb3d5..3d8e043d5 100644
--- a/mice.xml
+++ b/mice.xml
@@ -294,14 +294,17 @@ current mode for each mouse is held in the
      <wrap type="bool">false</wrap>
     </binding>
 
-    <!-- Middle button pressed: move the view up and down -->
+    <!-- Middle button pressed, no Ctrl: move the view up and down -->
     <binding>
      <condition>
       <and>
        <not>
         <property>/devices/status/mice/mouse[0]/button[0]</property>
        </not>
-        <property>/devices/status/mice/mouse[0]/button[1]</property>
+       <property>/devices/status/mice/mouse[0]/button[1]</property>
+       <not>
+        <property>/devices/status/keyboard/ctrl</property>
+       </not>
       </and>
      </condition>
      <command>property-adjust</command>
@@ -310,6 +313,23 @@ current mode for each mouse is held in the
      <wrap type="bool">false</wrap>
     </binding>
 
+    <!-- Middle button and Ctrl pressed: move the view forward and backward -->
+    <binding>
+     <condition>
+      <and>
+       <not>
+        <property>/devices/status/mice/mouse[0]/button[0]</property>
+       </not>
+       <property>/devices/status/mice/mouse[0]/button[1]</property>
+       <property>/devices/status/keyboard/ctrl</property>
+      </and>
+     </condition>
+     <command>property-adjust</command>
+     <property>/sim/current-view/z-offset-m</property>
+     <factor type="double">1</factor>
+     <wrap type="bool">false</wrap>
+    </binding>
+
    </y-axis>
 
   </mode>