Can't Assign Controls

when I click on a certain control (ex. toggle control mode) and i try to assign it to something, it instantly opens the menu that says “press a button” but before i can do anything it closes and puts a question mark as the control

1

please anybody