I've been using dmenu for ~10 years now :) can't imagine opening programs in a simpler or more efficient way.
To bind b to firefox appkey b firefox to open firefox <rshift> o b
If you decide you like chromium better tomorrow appkey b chromium.
If you want b to open a longer command appkey b "some long command here"