Index: code/branches/presentation2/data/gui/layouts/InfoPopup.layout
===================================================================
--- code/branches/presentation2/data/gui/layouts/InfoPopup.layout	(revision 6281)
+++ code/branches/presentation2/data/gui/layouts/InfoPopup.layout	(revision 6283)
@@ -9,5 +9,5 @@
             <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
             <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
-            <Property Name="Alpha" Value="0.6" />
+            <Property Name="Alpha" Value="0.7" />
             <Window Type="TaharezLook/Button" Name="orxonox/InfoPopup_close" >
                 <Property Name="Font" Value="BlueHighway-12" />
Index: code/branches/presentation2/data/gui/scripts/GUITools.lua
===================================================================
--- code/branches/presentation2/data/gui/scripts/GUITools.lua	(revision 6281)
+++ code/branches/presentation2/data/gui/scripts/GUITools.lua	(revision 6283)
@@ -5,7 +5,8 @@
 end
 
-function openInfoPopup( text, functionPtr )
+function openInfoPopup(text, functionPtr, closeButton)
     showGUI("InfoPopup", false, true)
-    InfoPopup.setDo(functionPtr)
+    InfoPopup.execute(functionPtr)
     InfoPopup.setText(text)
+    InfoPopup.setCloseButton(closeButton)
 end
Index: code/branches/presentation2/data/gui/scripts/InfoPopup.lua
===================================================================
--- code/branches/presentation2/data/gui/scripts/InfoPopup.lua	(revision 6281)
+++ code/branches/presentation2/data/gui/scripts/InfoPopup.lua	(revision 6283)
@@ -15,8 +15,7 @@
 end
 
-function P.setDo(functionPtr)
-    P.functionPtr = functionPtr
-    if P.functionPtr ~= nil then
-        P.functionPtr()
+function P.execute(functionPtr)
+    if functionPtr ~= nil then
+        functionPtr()
     end
 end
@@ -24,4 +23,14 @@
 function P.setText( text )
     winMgr:getWindow("orxonox/InfoPopup_text"):setText( text )
+end
+
+function P.setCloseButton(closeButton)
+    close = winMgr:getWindow("orxonox/InfoPopup_close")
+    close:setVisible(closeButton)
+    if(not closeButton) then
+        close:deactivate();
+    else
+        close:activate();
+    end
 end
 
Index: code/branches/presentation2/data/gui/scripts/KeyBindMenu.lua
===================================================================
--- code/branches/presentation2/data/gui/scripts/KeyBindMenu.lua	(revision 6281)
+++ code/branches/presentation2/data/gui/scripts/KeyBindMenu.lua	(revision 6283)
@@ -56,24 +56,30 @@
 
     for k,v in pairs(commandList) do
+        local line = winMgr:createWindow("DefaultWindow", "orxonox/KeyBindPane/Binding" .. k)
+        local command = winMgr:createWindow("TaharezLook/StaticText", "orxonox/KeyBindPane/Binding" .. k .. "/Command")
         local button = winMgr:createWindow("TaharezLook/Button", "orxonox/KeyBindPane/Binding" .. k .. "/Button")
-        local command = winMgr:createWindow("TaharezLook/StaticText", "orxonox/KeyBindPane/Binding" .. k .. "/Command")
-        local line = winMgr:createWindow("DefaultWindow", "orxonox/KeyBindPane/Binding" .. k)
+        local clear = winMgr:createWindow("TaharezLook/Button", "orxonox/KeyBindPane/Binding" .. k .. "/Clear")
         
         line:setSize(CEGUI.UVector2(CEGUI.UDim(1,-13),CEGUI.UDim(0, lineHeight)))
+        command:setSize(CEGUI.UVector2(CEGUI.UDim(0.55, 0), CEGUI.UDim(1, 0)))
         button:setSize(CEGUI.UVector2(CEGUI.UDim(0.4, 0), CEGUI.UDim(1, 0)))
-        command:setSize(CEGUI.UVector2(CEGUI.UDim(0.6, 0), CEGUI.UDim(1, 0)))
+        clear:setSize(CEGUI.UVector2(CEGUI.UDim(0.05, 0),CEGUI.UDim(1,0)))
         
-        button:setPosition(CEGUI.UVector2(CEGUI.UDim(0.6, 0),CEGUI.UDim(0, 0)))
+        line:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0),CEGUI.UDim(0, lineHeight*(k-1))))        
         command:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0),CEGUI.UDim(0, 0)))
-        line:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0),CEGUI.UDim(0, lineHeight*(k-1))))
+        button:setPosition(CEGUI.UVector2(CEGUI.UDim(0.55, 0),CEGUI.UDim(0, 0)))
+        clear:setPosition(CEGUI.UVector2(CEGUI.UDim(0.95, 0),CEGUI.UDim(0, 0)))
         
+        command:setText(nameList[k])
         button:setText(orxonox.KeyBinderManager:getInstance():getCurrent():getBinding(v))
-        command:setText(nameList[k])
-        
+        clear:setText("X")
+
         orxonox.KeyBinderManager:getInstance():subscribeEventHelper(button, "Clicked", P.filename .. ".KeyBindButton_clicked")
+        orxonox.KeyBinderManager:getInstance():subscribeEventHelper(clear, "Clicked", P.filename .. ".KeyBindClear_clicked")
         --button:subscribeScriptedEvent("EventClicked", P.filename .. ".KeyBindButton_clicked")
         
         line:addChildWindow(command)
         line:addChildWindow(button)
+        line:addChildWindow(clear)
         window:addChildWindow(line)
     end
@@ -83,13 +89,29 @@
     local we = CEGUI.toWindowEventArgs(e)
     local name = we.window:getName()
-    commandNr = tonumber(string.match(name, "%d+"))
+    buttonNr = tonumber(string.match(name, "%d+"))
     
     openInfoPopup("Press any button/key or move a mouse/joystick axis.", KeyBindMenu.keybind)
 end
 
+function P.KeyBindClear_clicked(e)
+    local we = CEGUI.toWindowEventArgs(e)
+    local name = we.window:getName()
+    clearNr = tonumber(string.match(name, "%d+"))
+    
+    
+end
+
 function P.keybind()
-    local funct = luaState:createLuaFunctor("InfoPopup:close()")
+    local funct = luaState:createLuaFunctor("KeyBindMenu.callback(" .. buttonNr ..")")
     orxonox.KeyBinderManager:getInstance():registerKeybindCallback(funct)
-    orxonox.KeyBinderManager:getInstance():keybind(commandList[commandNr])
+    orxonox.KeyBinderManager:getInstance():keybind(commandList[buttonNr])
+end
+
+function P.callback(number)
+    orxonox.KeyBinderManager:getInstance():registerKeybindCallback(0)
+    local button = winMgr:getWindow("orxonox/KeyBindPane/Binding" .. number .. "/Button")
+    button:setText(orxonox.KeyBinderManager:getInstance():getCurrent():getBinding(commandList[number]))
+    
+    InfoPopup.close()
 end
 
