Assigning the channel's Pre-Gain setting to the MIDI Keyboard in Cubase

In Cubase, I want to assign the pre-gain setting of the channels to one of the button faders on my midi keyboard. So when I select any channel, I want to turn down or up the pre-gain setting of that channel. I assigned it to a channel, but it only adjusts the pre-gain of that channel. When I select another channel, it doesn’t adjust it.

I’m using Arturia Keylab 88 Essentials, my midi keyboard is connected to the DAW and there is no problem.

You didn’t state but I am assuming you’re doing this in the MIDI Remote Mapping Assistant. In the list of functions you can specify Selected Channel and thus the Input Filter > Gain, which will adjust the pre-gain for any selected channel.