keybinding script

how to create key-bindings? just like when you press “i” (the inventory will open)

underneath the edit menu is a submenu called project settings. In that menu is input. this is where input is controlled. You can add your own controls here! also, you can do Input.GetKey(“i”);

I think you are looking for the Input class. Use like this in C#

void Update()
{
    if(Input.GetKeyDown(KeyCode.I))
    {
        //do something here
    }
}

See http://docs.unity3d.com/Documentation/ScriptReference/Input.GetKeyDown.html

Or you can use Input.GetButton("name") with the buttons defined in the Unity Input Manager which just maps a string to keyboard or mouse input. This is important if you want to let the player define which button on their keyboard does a specific in game action.
http://docs.unity3d.com/Documentation/ScriptReference/Input.GetButtonDown.html