Skip to content

Commit

Permalink
Merge branch 'slashdot' into 'master'
Browse files Browse the repository at this point in the history
Remove period and slash from keyboard navigation and inject tabs when using a controller

See merge request OpenMW/openmw!4475
  • Loading branch information
Capostrophic committed Dec 7, 2024
2 parents a66d4d7 + fb02ba1 commit c207397
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 c207397

Please sign in to comment.