From d3662ee9c875387f7dc1936a6eef7a0c3ab8deba Mon Sep 17 00:00:00 2001 From: thrust26 Date: Fri, 24 May 2019 18:31:46 +0200 Subject: [PATCH] key for entering Options dialog can now be remapped as documented --- src/common/PKeyboardHandler.cxx | 5 +++-- src/emucore/EventHandler.cxx | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/common/PKeyboardHandler.cxx b/src/common/PKeyboardHandler.cxx index b037a4317..fae182383 100644 --- a/src/common/PKeyboardHandler.cxx +++ b/src/common/PKeyboardHandler.cxx @@ -214,7 +214,8 @@ void PhysicalKeyboardHandler::setDefaultMapping(Event::Type event, EventMode mod void PhysicalKeyboardHandler::eraseMapping(Event::Type event, EventMode mode) { for(int i = 0; i < KBDK_LAST; ++i) - if(myKeyTable[i][mode] == event && i != KBDK_TAB) + // This key cannot be remapped + if(myKeyTable[i][mode] == event && !(i == KBDK_TAB && mode == EventMode::kMenuMode)) myKeyTable[i][mode] = Event::NoType; } @@ -255,7 +256,7 @@ bool PhysicalKeyboardHandler::addMapping(Event::Type event, EventMode mode, StellaKey key) { // These keys cannot be remapped - if(key == KBDK_TAB || Event::isAnalog(event)) + if(key == KBDK_TAB && mode == EventMode::kMenuMode || Event::isAnalog(event)) return false; else myKeyTable[key][mode] = event; diff --git a/src/emucore/EventHandler.cxx b/src/emucore/EventHandler.cxx index fb80e604d..1a8d944bb 100644 --- a/src/emucore/EventHandler.cxx +++ b/src/emucore/EventHandler.cxx @@ -769,8 +769,6 @@ void EventHandler::setActionMappings(EventMode mode) prepend = "Alt + ']' (*)"; else if(event == Event::SoundToggle) prepend = modifier + " + ']' (*)"; - else if(event == Event::OptionsMenuMode) - prepend = "Tab (*)"; else if(event == Event::UINavNext) prepend = "Tab (*)"; else if(event == Event::UINavPrev)