Reading out all operators in a header's menu
There's no straight-forward way to retrieve the contents of menus or other layout types.

If possible, create shortcuts in the User Preferences, but that might not be possible with external hardware keys. Or if that's sufficient for you, Right-click > Edit Source to see the layout code (mostly python-scripted).

It might be feasible to extract layout information somehow by hacking deep into the Blender internals with Python, see this to get an idea:

http://wiki.blender.org/index.php?title=Dev:2.5/Py/Scripts/Cookbook/Code_snippets/Interface&amp;oldid=226944#Overriding_Interface_Elements