Index: src/UIElements/TextUI/TextWindow.cpp
===================================================================
--- src/UIElements/TextUI/TextWindow.cpp	(revision 9c7e0f93616747e1a524ff1bc6b6beca81cda730)
+++ src/UIElements/TextUI/TextWindow.cpp	(revision d17f3dc57329f8bf69e73f21166b7985cb4d1a79)
@@ -56,4 +56,8 @@
 {
   map <std::string, TextMenu *> NametoTextMenuMap;
+  std::set <char> ShortcutList;
+  // reserve s for save and q for quite
+  ShortcutList.insert('s');
+  ShortcutList.insert('q');
 
   // populate all actions
@@ -69,15 +73,13 @@
 
   Action* undoAction = ActionRegistry::getInstance().getActionByName("undo");
-  new ActionMenuItem('u',"Undo last operation",main_menu,undoAction);
+  new ActionMenuItem(getSuitableShortForm(ShortcutList,"Undo last operation"),"Undo last operation",main_menu,undoAction);
 
   Action* redoAction = ActionRegistry::getInstance().getActionByName("redo");
-  new ActionMenuItem('r',"Redo last operation",main_menu,redoAction);
+  new ActionMenuItem(getSuitableShortForm(ShortcutList,"Redo last operation"),"Redo last operation",main_menu,redoAction);
 
   new SeperatorItem(main_menu);
 
-  TextMenu *Menu = NULL;
-  std::set <char> ShortcutList;
   for(map<std::string, pair<std::string,std::string> >::iterator iter = MapOfActions::getInstance().MenuDescription.begin(); iter != MapOfActions::getInstance().MenuDescription.end(); ++iter) {
-    Menu = new TextMenu(Log() << Verbose(0), iter->second.second);
+    TextMenu *Menu = new TextMenu(Log() << Verbose(0), iter->second.second);
     NametoTextMenuMap.insert( pair <std::string, TextMenu *> (iter->first, Menu) );
     new SubMenuItem(getSuitableShortForm(ShortcutList,iter->first),iter->second.first.c_str(),main_menu,Menu);
@@ -86,4 +88,5 @@
   new SeperatorItem(main_menu);
 
+  // save has reserved key 's'
   Action *saveConfigAction = ActionRegistry::getInstance().getActionByName("output");
   new ActionMenuItem('s',"save current setup to config files",main_menu,saveConfigAction);
@@ -92,9 +95,8 @@
   new ActionMenuItem('q',"quit",main_menu,quitAction);
 
+  // quit has reserved key 'q'
   // go through all menus and create them
-  for (map <std::string, TextMenu *>::iterator MenuRunner = NametoTextMenuMap.begin(); MenuRunner != NametoTextMenuMap.end(); ++MenuRunner) {
-    cout << "Creating Menu " << MenuRunner->first << "." << endl;
+  for (map <std::string, TextMenu *>::iterator MenuRunner = NametoTextMenuMap.begin(); MenuRunner != NametoTextMenuMap.end(); ++MenuRunner)
     populateMenu(MenuRunner->second, MenuRunner->first);
-  }
 
   // Add status indicators etc...
@@ -118,9 +120,22 @@
 {
   for (std::string::const_iterator CharRunner = name.begin(); CharRunner != name.end(); ++CharRunner) {
-    if (ShortcutList.find(*CharRunner) == ShortcutList.end())
+    if (ShortcutList.find(*CharRunner) == ShortcutList.end()) {
+      ShortcutList.insert(*CharRunner);
       return *CharRunner;
+    }
   }
-  DoeLog(1) && (eLog() << Verbose(1) << "Could not find a suitable shortform for TextWindow::getSuitableShortForm()." << endl);
-  return ((char)(ShortcutList.size() % 10) + '0');
+  // if no letter matches, take digits
+  int i=0;
+  for (;i<10;++i) {
+    if (ShortcutList.find((char)i + '0') == ShortcutList.end())
+      break;
+  }
+  if (i != 10) {
+    ShortcutList.insert((char)i + '0');
+    return ((char)i + '0');
+  } else {
+    DoeLog(1) && (eLog() << Verbose(1) << "Could not find a suitable shortform for " << name << "." << endl);
+    return '#';
+  }
 }
 
@@ -129,8 +144,9 @@
   Action *ActionItem = NULL;
   set <char> ShortcutList;
+  // reserve 'q' for quit
+  ShortcutList.insert('q');
   // through all actions for this menu
   pair < multimap <std::string, std::string>::iterator, multimap <std::string, std::string>::iterator > MenuActions = MapOfActions::getInstance().MenuContainsActionMap.equal_range(MenuName);
   for (multimap <std::string, std::string>::const_iterator MenuRunner = MenuActions.first; MenuRunner != MenuActions.second; ++MenuRunner) {
-    cout << " Adding " << MenuRunner->second << " to submenu " << MenuName << endl;
     ActionItem = ActionRegistry::getInstance().getActionByName(MenuRunner->second);
     new ActionMenuItem(getSuitableShortForm(ShortcutList, MenuRunner->second),MapOfActions::getInstance().getDescription(MenuRunner->second).c_str(),Menu,ActionItem);
