Can't assign buttons to certain controls

Not sure if this is a hardware problem but I’m posting it here. I’m having trouble assigning buttons to certain controls. Specifically, those are meant to be controlled by an axis. Since I don’t have enough available axis, I’d like to assign buttons to control them but that simply doesn’t work. When I open ‘Edit Axis’ option, there’s the ‘Assign Button’ option in the window that pops up. But pushing any button simply results in ‘selected button + ?’. The selection is not memorized and the button is not assigned. Neither any button on my HOTAS, nor any on the keyboard works. Combinations with shifts, control keys etc don’t work either.
I tried the ‘clear all’ option as some online posts suggested but that didn’t work.
I can’t fly a variable wing sweep aircraft because there’s no way for me to move the wing sweep. I actually tried assigning an axis but that is useless too because I need to hold the axis constantly to keep the wing in a position different to the default (that was Su-22M3). As soon as I release the axis back to neutral, the wing goes back to middle sweep.
I have HOTAS Warthog throttle with Warthog stick on AVA base.
Any suggestions?