well the important area for is the overridable inside your widget blueprint.
Within these function you´ll find: (OnKeyDown, OnMouseButtonDown a.s.o).
OnKeyDown for example fires when the widget which implements this function is in focus.
OnMouseButtonDown is exactly the same thing.
So for your workload you can go by doing something like this:
I assume you are able to load the Input Mappings and stuff, so i wont care about that here.
When you open your menu you see those mappings, and each mapping (“Item”) has a Button which you can click in order to prepare a new “Rebind” of specific input mapping.
So when you click that button, there may be a Text Widget show up, telling you “Press a new key” or something and maybe a bool which indicates that it is now possible to call your rebind logic.
So you press a key now -> will cause OnKeyDown to fire -> you check your bool from the step above if it is possible to do anything now -> no? do nothing. Yes -> go for your rebind.
Something important may be, not 100% sure, that you need to disable the keyboard focus for your Rebind widget -> Set that up inside you Design Panel -> you´ll find that option in the Details Section somewhere.
Hope that helps for the beginning