diff --git a/src/common/PKeyboardHandler.cxx b/src/common/PKeyboardHandler.cxx index f4de2220b..386425c70 100644 --- a/src/common/PKeyboardHandler.cxx +++ b/src/common/PKeyboardHandler.cxx @@ -66,7 +66,7 @@ void PhysicalKeyboardHandler::setDefaultMapping(Event::Type event, EventMode mod // Erase all mappings of given mode myKeyMap.eraseMode(mode); - auto setDefaultKey = [&](Event::Type k_event, StellaKey key, StellaMod mod = StellaMod::KBDM_NONE) + auto setDefaultKey = [&](Event::Type k_event, StellaKey key, int mod = StellaMod::KBDM_NONE) { if (eraseAll || k_event == event) { @@ -173,6 +173,11 @@ void PhysicalKeyboardHandler::setDefaultMapping(Event::Type event, EventMode mod setDefaultKey(Event::UISelect , KBDK_RETURN); setDefaultKey(Event::UICancel , KBDK_ESCAPE); + setDefaultKey(Event::UINavPrev , KBDK_TAB, KBDM_SHIFT); + setDefaultKey(Event::UINavNext , KBDK_TAB); + setDefaultKey(Event::UITabPrev , KBDK_TAB, KBDM_SHIFT|KBDM_CTRL); + setDefaultKey(Event::UITabNext , KBDK_TAB, KBDM_CTRL); + setDefaultKey(Event::UIPrevDir , KBDK_BACKSPACE); // FIXME - use the R77 define in the final release @@ -199,9 +204,7 @@ void PhysicalKeyboardHandler::setDefaultMapping(Event::Type event, EventMode mod // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void PhysicalKeyboardHandler::eraseMapping(Event::Type event, EventMode mode) { - // This key cannot be remapped - if (event != Event::UINavNext || mode != EventMode::kMenuMode) - myKeyMap.eraseEvent(event, mode); + myKeyMap.eraseEvent(event, mode); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -222,7 +225,7 @@ bool PhysicalKeyboardHandler::addMapping(Event::Type event, EventMode mode, StellaKey key, StellaMod mod) { // These keys cannot be remapped - if((key == KBDK_TAB && mode == EventMode::kMenuMode) || Event::isAnalog(event)) + if(Event::isAnalog(event)) return false; else myKeyMap.add(event, mode, key, mod); diff --git a/src/emucore/EventHandler.cxx b/src/emucore/EventHandler.cxx index dfbd86071..d8f08af33 100644 --- a/src/emucore/EventHandler.cxx +++ b/src/emucore/EventHandler.cxx @@ -759,14 +759,6 @@ void EventHandler::setActionMappings(EventMode mode) if(event == Event::Quit) prepend = modifier + "+Q (*)"; - else if(event == Event::UINavNext) - prepend = "Tab (*)"; - else if(event == Event::UINavPrev) - prepend = "Shift+Tab (*)"; - else if (event == Event::UITabNext) - prepend = modifier + "+Tab (*)"; - else if (event == Event::UITabPrev) - prepend = modifier + "+Shift+Tab (*)"; // else if ... if(key == "") diff --git a/src/gui/Dialog.cxx b/src/gui/Dialog.cxx index a279a7b46..d3e6ed56c 100644 --- a/src/gui/Dialog.cxx +++ b/src/gui/Dialog.cxx @@ -449,26 +449,6 @@ void Dialog::handleKeyDown(StellaKey key, StellaMod mod) // Shift-Tab sets previous widget in current tab Event::Type e = Event::NoType; - // Detect selection of previous and next tab headers and objects - if(key == KBDK_TAB) - { - if(StellaModTest::isControl(mod)) - { - // tab header navigation - if(StellaModTest::isShift(mod)) - e = Event::UITabPrev; - else - e = Event::UITabNext; - } - else - { - // object navigation - if(StellaModTest::isShift(mod)) - e = Event::UINavPrev; - else - e = Event::UINavNext; - } - } // FIXME - use the R77 define in the final release // use the '1' define for testing #if defined(RETRON77)