浏览代码

Linux Control key detection wrong #1423

JimMarlowe 8 年之前
父节点
当前提交
cbae4d51af
共有 2 个文件被更改,包括 9 次插入9 次删除
  1. 6 6
      Source/Atomic/UI/UIViewInput.cpp
  2. 3 3
      Source/AtomicEditor/Editors/SceneEditor3D/SceneView3D.cpp

+ 6 - 6
Source/Atomic/UI/UIViewInput.cpp

@@ -92,10 +92,10 @@ void UIView::HandleMouseButtonDown(StringHash eventType, VariantMap& eventData)
     Input* input = GetSubsystem<Input>();
     int qualifiers = input->GetQualifiers();
 
-#ifdef ATOMIC_PLATFORM_WINDOWS
-    bool superdown = input->GetKeyDown(KEY_LCTRL) || input->GetKeyDown(KEY_RCTRL);
-#else
+#ifdef ATOMIC_PLATFORM_OSX
     bool superdown = input->GetKeyDown(KEY_LGUI) || input->GetKeyDown(KEY_RGUI);
+#else
+    bool superdown = input->GetKeyDown(KEY_LCTRL) || input->GetKeyDown(KEY_RCTRL);
 #endif
 
     MODIFIER_KEYS mod = GetModifierKeys(qualifiers, superdown);
@@ -136,10 +136,10 @@ void UIView::HandleMouseButtonUp(StringHash eventType, VariantMap& eventData)
     pos = input->GetMousePosition();
     int qualifiers = input->GetQualifiers();
 
-#ifdef ATOMIC_PLATFORM_WINDOWS
-    bool superdown = input->GetKeyDown(KEY_LCTRL) || input->GetKeyDown(KEY_RCTRL);
-#else
+#ifdef ATOMIC_PLATFORM_OSX
     bool superdown = input->GetKeyDown(KEY_LGUI) || input->GetKeyDown(KEY_RGUI);
+#else
+    bool superdown = input->GetKeyDown(KEY_LCTRL) || input->GetKeyDown(KEY_RCTRL);
 #endif
 
     MODIFIER_KEYS mod = GetModifierKeys(qualifiers, superdown);

+ 3 - 3
Source/AtomicEditor/Editors/SceneEditor3D/SceneView3D.cpp

@@ -281,10 +281,10 @@ void SceneView3D::MoveCamera(float timeStep)
         CheckCameraSpeedBounds();
     }
 
-#ifdef ATOMIC_PLATFORM_WINDOWS
-    bool superdown = input->GetKeyDown(KEY_LCTRL) || input->GetKeyDown(KEY_RCTRL);
-#else
+#ifdef ATOMIC_PLATFORM_OSX
     bool superdown = input->GetKeyDown(KEY_LGUI) || input->GetKeyDown(KEY_RGUI);
+#else
+    bool superdown = input->GetKeyDown(KEY_LCTRL) || input->GetKeyDown(KEY_RCTRL);
 #endif
 
     if (!orbitting && mouseInView && !superdown && input->GetMouseButtonDown(MOUSEB_RIGHT)) {