Maybe not elegant but a simple solution:
F1, F2, F3, etc., are already in your DCS key commands list. Simply assign your TM MFD buttons to them. When the comms menu is open, these MFD buttons will select only the comms menu items. Of course, when the comms menu is not open they will still perform the normal F key functions as assigned.