You could try making a script, example this should set the selected tracks to MIDI input > All MIDI Inputs > All channels. See comments in code to change.
Code:
local channel = 0 -- 0 = all channels, 1-16 = channel #.
local input = 63 -- 63 = all, 62 = Virtual Keyboard, or MIDI Input Device ID# from Preferences > MIDI Devices.
local flags = 4096 | channel | (input << 5)
-- apply to selected tracks
for i = 0, reaper.CountSelectedTracks(0) - 1 do
local track = reaper.GetSelectedTrack(0, i)
reaper.SetMediaTrackInfo_Value(track, "I_RECINPUT", flags)
end