Skip to content

Commit

Permalink
Remove period and slash from keyboard navigation and inject tabs when…
Browse files Browse the repository at this point in the history
… using a controller
  • Loading branch information
Assumeru committed Dec 5, 2024
1 parent a66d4d7 commit fb02ba1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 0 additions & 4 deletions apps/openmw/mwgui/keyboardnavigation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,6 @@ namespace MWGui
return switchFocus(D_Down, false);
case MyGUI::KeyCode::Tab:
return switchFocus(MyGUI::InputManager::getInstance().isShiftPressed() ? D_Prev : D_Next, true);
case MyGUI::KeyCode::Period:
return switchFocus(D_Prev, true);
case MyGUI::KeyCode::Slash:
return switchFocus(D_Next, true);
case MyGUI::KeyCode::Return:
case MyGUI::KeyCode::NumpadEnter:
case MyGUI::KeyCode::Space:
Expand Down
6 changes: 4 additions & 2 deletions apps/openmw/mwinput/controllermanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,12 @@ namespace MWInput
key = MyGUI::KeyCode::Apostrophe;
break;
case SDL_CONTROLLER_BUTTON_LEFTSHOULDER:
MWBase::Environment::get().getWindowManager()->injectKeyPress(MyGUI::KeyCode::Period, 0, false);
MyGUI::InputManager::getInstance().injectKeyPress(MyGUI::KeyCode::LeftShift);
MWBase::Environment::get().getWindowManager()->injectKeyPress(MyGUI::KeyCode::Tab, 0, false);
MyGUI::InputManager::getInstance().injectKeyRelease(MyGUI::KeyCode::LeftShift);
return true;
case SDL_CONTROLLER_BUTTON_RIGHTSHOULDER:
MWBase::Environment::get().getWindowManager()->injectKeyPress(MyGUI::KeyCode::Slash, 0, false);
MWBase::Environment::get().getWindowManager()->injectKeyPress(MyGUI::KeyCode::Tab, 0, false);
return true;
case SDL_CONTROLLER_BUTTON_LEFTSTICK:
mGamepadGuiCursorEnabled = !mGamepadGuiCursorEnabled;
Expand Down

0 comments on commit fb02ba1

Please sign in to comment.