Configure MIDI CC assignment by typing a controller number?

Is there any way to set a MIDI CC assignment by typing the controller number?

“Learn” assumes that you are using a hardware MIDI device. This is not always a valid assumption.

In my case, I have to: set up a MIDI bridge to another app (SuperCollider, Pure Data); click “learn”; switch window and fire off a MIDI message; and hope for the best. It would be so so so very much easier to just right-click, choose “type MIDI assigment,” type “2” for CC 2 and be done with it.