From a14d5c654610951a55bbdccbdbb70c2f45a21c52 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Fri, 23 Mar 2018 11:55:16 -0700 Subject: [PATCH] make alternate keys work --- interface/resources/controllers/keyboardMouse.json | 10 ++++------ interface/src/Application.cpp | 12 ------------ 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/interface/resources/controllers/keyboardMouse.json b/interface/resources/controllers/keyboardMouse.json index d44b150ab1..1057e43e9d 100644 --- a/interface/resources/controllers/keyboardMouse.json +++ b/interface/resources/controllers/keyboardMouse.json @@ -54,11 +54,11 @@ }, { "from": { "makeAxis" : [ - ["Keyboard.A", "Keyboard.Left", "Keyboard.TouchpadLeft"], + ["Keyboard.A", "Keyboar.Left", "Keyboard.TouchpadLeft"], ["Keyboard.D", "Keyboard.Right", "Keyboard.TouchpadRight"] ] }, - "when": "Application.CameraFirstPerson", + "when": ["Application.CameraFirstPerson", "!Keyboard.Shift"], "to": "Actions.Yaw" }, { "from": { "makeAxis" : [ @@ -66,7 +66,7 @@ ["Keyboard.D", "Keyboard.Right", "Keyboard.TouchpadRight"] ] }, - "when": "Application.CameraThirdPerson", + "when": ["Application.CameraThirdPerson", "!Keyboard.Shift"], "to": "Actions.Yaw" }, { "from": { "makeAxis" : ["Keyboard.MouseMoveLeft", "Keyboard.MouseMoveRight"] }, @@ -80,10 +80,8 @@ { "from": "Keyboard.W", "when": "!Keyboard.Control", "to": "Actions.LONGITUDINAL_FORWARD" }, { "from": "Keyboard.S", "when": "!Keyboard.Control", "to": "Actions.LONGITUDINAL_BACKWARD" }, - { "from": "Keyboard.Shift", "to": "Actions.SPRINT" }, + { "from": "Keyboard.Shift", "when": ["!Keyboard.Left", "!Keyboard.Right"], "to": "Actions.SPRINT" }, { "from": "Keyboard.Control", "to": "Actions.VERTICAL_DOWN" }, - { "from": "Keyboard.Left", "when": "Keyboard.RightMouseButton", "to": "Actions.LATERAL_LEFT" }, - { "from": "Keyboard.Right", "when": "Keyboard.RightMouseButton", "to": "Actions.LATERAL_RIGHT" }, { "from": "Keyboard.Left", "when": "Keyboard.Shift", "to": "Actions.LATERAL_LEFT" }, { "from": "Keyboard.Right", "when": "Keyboard.Shift", "to": "Actions.LATERAL_RIGHT" }, { "from": "Keyboard.Down", "when": "Keyboard.Shift", "to": "Actions.PITCH_DOWN" }, diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 359f3faad1..16b34377b2 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3526,18 +3526,6 @@ void Application::keyPressEvent(QKeyEvent* event) { Menu::getInstance()->triggerOption(MenuOption::Chat); break; - case Qt::Key_Left: - if (_myCamera.getMode() == CAMERA_MODE_MIRROR) { - _mirrorYawOffset += PI / 20.0f; - } - break; - - case Qt::Key_Right: - if (_myCamera.getMode() == CAMERA_MODE_MIRROR) { - _mirrorYawOffset -= PI / 20.0f; - } - break; - #if 0 case Qt::Key_I: if (isShifted) {