engine/commands/magic/source/MagicKeyboardCommandMap.cpp
// Settings currently does nothing here.
Settings currently does nothing here.
Settings currently does nothing here .
void MagicKeyboardCommandMap::initialize_command_mapping(const Settings& settings)
{
  string esc_key;
  esc_key = NC_ESCAPE_KEY;
  command_mapping.clear();
  command_mapping = KeyboardCommandMappingMap{{std::to_string('.'), MagicCommandKeys::NEXT_PAGE},
                                              {std::to_string(','), MagicCommandKeys::PREVIOUS_PAGE},
                                              {std::to_string('z'), MagicCommandKeys::EXIT_MAGIC},
                                              {std::to_string('Z'), MagicCommandKeys::EXIT_MAGIC},
                                              {std::to_string(NC_ESCAPE_KEY), MagicCommandKeys::EXIT_MAGIC},
                                              {esc_key, MagicCommandKeys::EXIT_MAGIC}};
  for (char c = 'a'; c < 'z'; c++)
  {
    command_mapping.insert(make_pair(std::to_string(c), MagicCommandKeys::SELECT_SPELL));
  }
}
void MagicKeyboardCommandMap :: initialize_command_mapping ( const Settings & settings ) { string esc_key ; esc_key = NC_ESCAPE_KEY ; command_mapping . clear ( ) ; command_mapping = KeyboardCommandMappingMap { { std :: to_string ( ' ' ) , MagicCommandKeys :: NEXT_PAGE } , { std :: to_string ( ' ' ) , MagicCommandKeys :: PREVIOUS_PAGE } , { std :: to_string ( ' ' ) , MagicCommandKeys :: EXIT_MAGIC } , { std :: to_string ( ' ' ) , MagicCommandKeys :: EXIT_MAGIC } , { std :: to_string ( NC_ESCAPE_KEY ) , MagicCommandKeys :: EXIT_MAGIC } , { esc_key , MagicCommandKeys :: EXIT_MAGIC } } ; for ( char c = ' ' ; c < ' ' ; c ++ ) { command_mapping . insert ( make_pair ( std :: to_string ( c ) , MagicCommandKeys :: SELECT_SPELL ) ) ; } }
Settings currently does nothing here.
Settings currently does nothing here .
// Select a spell // a - y should select a spell (or do nothing, if there are not that many spells in the list).