What I do in Windward is simple. Right-click a bindable button, and choose the "Rebind" option. This listens to the next key I press, and simply changes UIKeyBinding's keyCode to that value.
void Update ()
{
for(int i =0, imax = NGUITools.keys.Length; i < imax;++i)