The MIDI Learn page allows you to select the Source, Target, and Type for your mapping. 

After selecting the Source and Target, the Type field is commonly overlooked by accident; this is where you may select whether you want your mapped button to function as a momentary or toggle switch.
You need to manually set the type to "Toggle" when mapping your controller and configuring the MIDI function that you want the Force to learn. This section is marked in yellow below...



Your external MIDI controller's buttons may not work as you would expect if the "Type" field is set to the wrong function or accidentally overlooked, so please revise your selection before proceeding to use your MIDI controller.