Universal remote using ir emmiter

thanks my goal is to make it recieve an signal from another remote and when i press a button it asigns the certain hex code to that button so when i press it the emitter sends that signal. Ps idk if im making any sense at all.