Index: code/branches/HUD_HS16/src/modules/pickup/PickupManager.cc
===================================================================
--- code/branches/HUD_HS16/src/modules/pickup/PickupManager.cc	(revision 11241)
+++ code/branches/HUD_HS16/src/modules/pickup/PickupManager.cc	(revision 11252)
@@ -43,4 +43,5 @@
 #include "core/input/KeyBinderManager.h"    //for keybinding
 #include "core/input/KeyBinder.h"           //for keybinding
+#include "core/command/ConsoleCommandIncludes.h"
 
 #include "infos/PlayerInfo.h"
@@ -66,4 +67,7 @@
     RegisterAbstractClass(PickupManager).inheritsFrom<PickupListener>();
 
+    SetConsoleCommand2("useUnusePickup", &PickupManager::useUnusePickup).addShortcut().setActive(true);
+
+   // SetConsoleCommand("HumanController", "fire",           &HumanController::fire          ).addShortcut().keybindMode(KeybindMode::OnHold);
     /**
     @brief
@@ -290,9 +294,9 @@
             this->pickups_[index] = pickup;
 
-             //Add pickup keybinding
-            if( KeyBinderManager::exists() )
-                addKeyBindingForNewPickup(pickup, index);
-            else
-                orxout() << "Could not create new keybinding because KeyBinderManager doesn't exist." << endl;
+            //  //Add pickup keybinding
+            // if( KeyBinderManager::exists() )
+            //     addKeyBindingForNewPickup(pickup, index);
+            // else
+            //     orxout() << "Could not create new keybinding because KeyBinderManager doesn't exist." << endl;
         }
         else // If it was dropped, it is removed from the required lists.
@@ -302,13 +306,13 @@
             index = it->second;
 
-            //Remove pickup keybinding
-            if( KeyBinderManager::exists() )
-                  removeKeyBindingForOldPickup(pickup, index);
-            else
-                orxout() << "Could not delete old keybinding because KeyBinderManager doesn't exist." << endl;
+            // //Remove pickup keybinding
+            // if( KeyBinderManager::exists() )
+            //       removeKeyBindingForOldPickup(pickup, index);
+            // else
+            //     orxout() << "Could not delete old keybinding because KeyBinderManager doesn't exist." << endl;
 
             // Remove the Pickupable from the indexes_ and pickups_ list.
             this->indexes_.erase(pickup);
-            this->pickups_.find(index)->second=nullptr; //set to null, so that can be indentified as free slot by getPickupIndex()
+            this->pickups_.find(index)->second=nullptr; //set to null, so that can be identified as free slot by getPickupIndex()
         }
 
@@ -339,33 +343,52 @@
 
     //PRECONDITION: KeyBinderManager exists, pickup is not NULL, 0 < index < 9
-    //FUNCTION: Adds a keybinding for the new pickup using its index
-    void PickupManager::addKeyBindingForNewPickup(Pickupable* pickup, uint32_t index)
-    {
-        std::string name="Keys.KeyNumpad";
-        std::string binding="";
-
-        name.append(std::to_string(index));
-
-        KeyBinderManager::getInstance().getCurrent()->setBinding("KeyESC", name, true); // TODO do not set all bindings to ESC
-
-        orxout() << "Keybinding for item " << index << " has been added on keybinding " << name << endl;
-
-
-    }
+    //FUNCTION: Adds a keybinding for the new pickup using its index and sets a console command
+    // void PickupManager::addKeyBindingForNewPickup(Pickupable* pickup, uint32_t index)
+    // {
+    //     std::string name="Keys.KeyNumpad";
+    //     std::string binding="useOrUnusePickup";
+
+    //     name.append(std::to_string(index));
+    //     binding.append(std::to_string(index));
+
+    //     SetConsoleCommand(binding, &PickupManager::useUnusePickup(pickup, index));
+    //     KeyBinderManager::getInstance().getCurrent()->setBinding(binding, name, true); 
+
+    //     orxout() << "Keybinding for item " << index << " has been added on keybinding " << name << endl;
+
+
+    // }
 
     //PRECONDITION: KeyBinderManager exists, pickup is not NULL, 0 < index < 9
     //FUNCTION: Removes the keybinding of the pickup using its index
-    void PickupManager::removeKeyBindingForOldPickup(Pickupable* pickup, uint32_t index)
-    {
-        std::string name="Keys.KeyNumpad";
-        std::string binding="";
-
-        name.append(std::to_string(index));
-
-        KeyBinderManager::getInstance().getCurrent()->setBinding("", name, true); 
-
-        orxout() << "Keybinding for item " << index << " has been removed on keybinding " << name << endl;
-
-    }
+    // void PickupManager::removeKeyBindingForOldPickup(Pickupable* pickup, uint32_t index)
+    // {
+    //     std::string name="Keys.KeyNumpad";
+    //     std::string binding="";
+
+    //     name.append(std::to_string(index));
+
+    //     SetConsoleCommand(binding, nullptr);
+    //     KeyBinderManager::getInstance().getCurrent()->setBinding("", name, true); 
+
+    //     orxout() << "Keybinding for item " << index << " has been removed on keybinding " << name << endl;
+
+    // }
+
+    //This function is called by the command line or by the key binding
+    //it uses or unuses the pickup, depending on its current state
+    void PickupManager::useUnusePickup() //uint32_t index
+    {
+        // orxout() << "Hello there i was here " << index << endl;  
+        orxout() << "Hello there i was here " << endl; 
+        // Pickupable* pickup=pickups_.find(index)->second;
+        // if(pickup==nullptr) return;                       //pickup does not exist
+      
+        // if(pickup->used)
+        //     usePickup(pickup, false);
+        // else
+        //     usePickup(pickup, true);
+    }
+
 
     /**
Index: code/branches/HUD_HS16/src/modules/pickup/PickupManager.h
===================================================================
--- code/branches/HUD_HS16/src/modules/pickup/PickupManager.h	(revision 11241)
+++ code/branches/HUD_HS16/src/modules/pickup/PickupManager.h	(revision 11252)
@@ -135,4 +135,6 @@
 
             void dropPickup(uint32_t pickup); //!< Drop the input Pickupable.
+            //void useUnusePickup(uint32_t index);
+            void useUnusePickup(); //tolua_export
             void usePickup(uint32_t pickup, bool use); //!< Use (or unuse) the input Pickupable.
              /**
