key for entering Options dialog can now be remapped as documented

This commit is contained in:
thrust26 2019-05-24 18:31:46 +02:00
parent c86aa6957b
commit d3662ee9c8
2 changed files with 3 additions and 4 deletions

View File

@ -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;

View File

@ -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)